[FIX] doesn't work in multi user env (#532)
1/ launch code with user A, a temp dir is create with user A 2/ launch code with user B --> permission denied
This commit is contained in:
parent
756bf2c6c2
commit
cb3f4e856b
|
@ -8,7 +8,7 @@ import time
|
|||
import six
|
||||
import yaml
|
||||
|
||||
from tempfile import gettempdir
|
||||
from tempfile import mkdtemp
|
||||
import platform
|
||||
|
||||
from typing import Any, Dict
|
||||
|
@ -16,7 +16,7 @@ from typing import Any, Dict
|
|||
logging.basicConfig()
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
pickle_dir = environ.get("ESCPOS_CAPABILITIES_PICKLE_DIR", gettempdir())
|
||||
pickle_dir = environ.get("ESCPOS_CAPABILITIES_PICKLE_DIR", mkdtemp())
|
||||
pickle_path = path.join(
|
||||
pickle_dir, "{v}.capabilities.pickle".format(v=platform.python_version())
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue