[printer_watch] On écrit dans var
This commit is contained in:
parent
1c9534b082
commit
f4c315cda8
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@ from md5 import md5
|
|||
|
||||
successfuly_imported = False
|
||||
try:
|
||||
with open("printer_watch_status.json", "r") as to_load:
|
||||
with open("/usr/scripts/var/impression/printer_watch_status.json", "r") as to_load:
|
||||
extracted_dict = json.load(to_load)
|
||||
try:
|
||||
last_status = extracted_dict[u"last_status"]
|
||||
|
@ -58,5 +58,5 @@ elif status == ('2',) and successfuly_imported and last_status == '5':
|
|||
else:
|
||||
message_id = None
|
||||
|
||||
with open("printer_watch_status.json", "w") as dump_file:
|
||||
with open("/usr/scripts/var/impression/printer_watch_status.json", "w") as dump_file:
|
||||
json.dump({u"last_status": status[0], u"message_id": message_id}, dump_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue