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()