Use userid in the temp path

This commit is contained in:
László Károlyi 2020-04-11 23:40:39 +02:00
parent e1bcdb92e7
commit 3c39f5e114
Signed by: karolyi
GPG Key ID: 2DCAF25E55735BFE
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from http.client import HTTPResponse
from logging import getLogger
from os import geteuid
from pathlib import Path
from tempfile import gettempdir, gettempprefix
from threading import Thread
@ -13,7 +14,8 @@ from filelock import FileLock
from .utils import is_setuptime
LOGGER = getLogger(__name__)
TMP_PATH = Path(gettempdir()).joinpath(f'{gettempprefix()}-py3-validate-email')
TMP_PATH = Path(gettempdir()).joinpath(
f'{gettempprefix()}-py3-validate-email-{geteuid()}')
TMP_PATH.mkdir(exist_ok=True)
BLACKLIST_URL = (
'https://raw.githubusercontent.com/martenson/disposable-email-domains/'