From 27d05f071244ff391b3b1000aa558cc9394e7722 Mon Sep 17 00:00:00 2001 From: Coding with Peter Date: Thu, 18 May 2023 17:50:18 -0700 Subject: [PATCH] data.db name conflict fix --- localcache.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/localcache.py b/localcache.py index d074fd6..b4004a9 100644 --- a/localcache.py +++ b/localcache.py @@ -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()