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:
Andrew Baumann
2024-05-22 14:13:11 +02:00
committed by GitHub
parent c150c7671f
commit ed92e0f7eb
-11
View File
@@ -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"""