use package for tempdir

cherry-picked from 8494cca526 in #274
This commit is contained in:
Patrick Kanzler 2018-05-13 18:51:38 +02:00
parent 599f4f3ca5
commit 47b4d41b28
No known key found for this signature in database
GPG Key ID: F07F07153306FCEF
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ Cody (Quantified Code Bot) <cody@quantifiedcode.com> Cody <cody@quantifiedcode.c
Renato Lorenzi <renato.lorenzi@senior.com.br> Renato.Lorenzi <renato.lorenzi@senior.com.br> Renato Lorenzi <renato.lorenzi@senior.com.br> Renato.Lorenzi <renato.lorenzi@senior.com.br>
Ahmed Tahri <nyuubi.10@gmail.com> TAHRI Ahmed <nyuubi.10@gmail.com> Ahmed Tahri <nyuubi.10@gmail.com> TAHRI Ahmed <nyuubi.10@gmail.com>
Michael Elsdörfer <michael@elsdoerfer.com> Michael Elsdörfer <michael@elsdoerfer.info> Michael Elsdörfer <michael@elsdoerfer.com> Michael Elsdörfer <michael@elsdoerfer.info>
Juanmi Taboada <juanmi@juanmitaboada.com> Juanmi Taboada <juanmi@juanmitaboada.com>
csoft2k <csoft2k@hotmail.com> csoft2k <csoft2k@hotmail.com>
Sergio Pulgarin <sergio.pulgarin@gmail.com> Sergio Pulgarin <sergio.pulgarin@gmail.com>
reck31 <rakesh.gunduka@gmail.com> reck31 <rakesh.gunduka@gmail.com>

View File

@ -7,12 +7,12 @@ import time
import six import six
import yaml import yaml
from tempfile import gettempdir
logging.basicConfig() logging.basicConfig()
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
pickle_dir = environ.get('ESCPOS_CAPABILITIES_PICKLE_DIR', gettempdir())
pickle_dir = environ.get('ESCPOS_CAPABILITIES_PICKLE_DIR', '/tmp/')
pickle_path = path.join(pickle_dir, 'capabilities.pickle') pickle_path = path.join(pickle_dir, 'capabilities.pickle')
capabilities_path = environ.get( capabilities_path = environ.get(
'ESCPOS_CAPABILITIES_FILE', 'ESCPOS_CAPABILITIES_FILE',