home · contact · privacy
Improve /fix accounting scripts.
[misc] / plomlib.py
index 6a13f05f4b20b148be7b8464a60f268ad9464626..18c2f185ec615a6dc61c6232bdf19b585499668b 100644 (file)
@@ -27,6 +27,9 @@ class PlomDB:
     def backup(self):
         import shutil
         from datetime import datetime, timedelta
+        if not os.path.exists(self.db_file):
+            return
+
         # collect modification times of numbered .bak files
         bak_prefix = f'{self.db_file}.bak.'
         backup_dates = []