data.db name conflict fix

This commit is contained in:
Coding with Peter 2023-05-18 17:50:18 -07:00
parent 42a1c941f5
commit 27d05f0712
1 changed files with 4 additions and 1 deletions

View File

@ -1102,7 +1102,10 @@ def full_reload():
time = date_time = dt.fromtimestamp( getmtime(path + file) )
newname = 'data'+ time.strftime('%Y%m%d') + ".db"
print("renaming old data file to %s" % newname)
os.rename(path+file, path + newname)
try:
os.rename(path+file, path + newname)
except Exception as e:
print("Couldn't rename file:", str(e))
sync_non_interactive()