output debug message for variables write to temporary file

This commit is contained in:
beelit94 2017-05-15 11:07:01 +08:00
parent cd0ab7a4e6
commit 560ff0bc02

View file

@ -294,8 +294,9 @@ class VariableFiles(object):
def create(self, variables): def create(self, variables):
with tempfile.NamedTemporaryFile('w+t', delete=False) as temp: with tempfile.NamedTemporaryFile('w+t', delete=False) as temp:
logging.debug('{0} is created'.format(temp.name)) log.debug('{0} is created'.format(temp.name))
self.files.append(temp) self.files.append(temp)
log.debug('variables wrote to tempfile: {0}'.format(str(variables)))
temp.write(json.dumps(variables)) temp.write(json.dumps(variables))
file_name = temp.name file_name = temp.name