1
0
mirror of https://github.com/mbirth/tcl_ota_check.git synced 2024-09-19 22:33:25 +01:00

Set prds.json mtime to past to force update after upload.

This commit is contained in:
Markus Birth 2018-01-17 17:59:45 +01:00
parent 92813c604c
commit 9ab7314662
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A

View File

@ -31,3 +31,12 @@ for fn in file_list:
os.remove(fn) os.remove(fn)
add_text = " - Please try again later." add_text = " - Please try again later."
print(" ERROR: HTTP {}{}".format(r.status_code, add_text)) print(" ERROR: HTTP {}{}".format(r.status_code, add_text))
# Mark prds.json as outdated to fetch updated version
print("Mark PRD cache for update…", end="")
try:
os.utime("prds.json", times=(1, 1))
print(" OK")
except OSError as e:
print(" FAILED")