mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-12 03:11:51 -06:00
add in secret -1 option to never overwrite
This commit is contained in:
@@ -14,6 +14,7 @@ def check_and_update():
|
|||||||
except json.JSONDecodeError:
|
except json.JSONDecodeError:
|
||||||
file = {'last_generated' : -1}
|
file = {'last_generated' : -1}
|
||||||
regen = time.time() - 3600 >= file['last_generated']
|
regen = time.time() - 3600 >= file['last_generated']
|
||||||
|
if file['last_generated'] != -1:
|
||||||
with open(path, 'w') as file:
|
with open(path, 'w') as file:
|
||||||
file = json.dump({'last_generated' : int(time.time())}, file)
|
file = json.dump({'last_generated' : int(time.time())}, file)
|
||||||
return regen
|
return regen
|
||||||
|
|||||||
Reference in New Issue
Block a user