Fixed an issue with the temporary directory not being accessible in windows for some users.
This commit is contained in:
parent
ae1b4c7a87
commit
af763eeb13
1 changed files with 2 additions and 6 deletions
8
utils.py
8
utils.py
|
|
@ -1,6 +1,6 @@
|
|||
from __future__ import print_function
|
||||
import os, zipfile, io, platform
|
||||
import sys
|
||||
import sys, tempfile
|
||||
|
||||
DEBUG = False
|
||||
|
||||
|
|
@ -8,11 +8,7 @@ def is_windows():
|
|||
return platform.system() == 'Windows'
|
||||
|
||||
def get_temp_dir():
|
||||
if is_windows():
|
||||
temp_dir = os.path.join('c:/','windows','temp')
|
||||
else:
|
||||
temp_dir = os.path.sep+'tmp'
|
||||
return temp_dir
|
||||
return tempfile.gettempdir()
|
||||
|
||||
def log(*args):
|
||||
if DEBUG:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue