mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-19 18:35:24 +00:00
Remove unused parsedmarc.utils.tempdir (#517)
Parsedmarc.utils was creating a temp directory on every import, but this directory is no longer used anywhere.
This commit is contained in:
@@ -13,7 +13,6 @@ import mailparser
|
||||
import json
|
||||
import hashlib
|
||||
import base64
|
||||
import atexit
|
||||
import mailbox
|
||||
import re
|
||||
import csv
|
||||
@@ -45,16 +44,6 @@ null_file = open(os.devnull, "w")
|
||||
mailparser_logger = logging.getLogger("mailparser")
|
||||
mailparser_logger.setLevel(logging.CRITICAL)
|
||||
|
||||
tempdir = tempfile.mkdtemp()
|
||||
|
||||
|
||||
def _cleanup():
|
||||
"""Remove temporary files"""
|
||||
shutil.rmtree(tempdir)
|
||||
|
||||
|
||||
atexit.register(_cleanup)
|
||||
|
||||
|
||||
class EmailParserError(RuntimeError):
|
||||
"""Raised when an error parsing the email occurs"""
|
||||
|
||||
Reference in New Issue
Block a user