1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-15 23:41:12 +00:00

handle fail in tmpdir creation

This commit is contained in:
deadc0de6
2020-11-04 09:24:35 +01:00
parent aa14fb15fa
commit 6d0f42f1f9

View File

@@ -102,6 +102,7 @@ def get_tmpdir():
def _get_tmpdir():
"""create the tmpdir"""
try:
if ENV_TEMP in os.environ:
t = os.environ[ENV_TEMP]
t = os.path.expanduser(t)
@@ -109,6 +110,8 @@ def _get_tmpdir():
t = os.path.normpath(t)
os.makedirs(t, exist_ok=True)
return t
except Exception:
pass
return tempfile.mkdtemp(prefix='dotdrop-')