Skip to content

Commit

Permalink
Fix #530 (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouni authored Sep 16, 2024
1 parent 1da1ad9 commit b0cef60
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions library.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ def migrate_mappings(self):
def get_last_update(self) -> str:
"""Get last update from meta table."""
with contextlib.closing(sqlite3.connect(self.partsdb_file)) as con, con as cur:
last_update = cur.execute("SELECT last_update FROM meta").fetchone()
if last_update:
return last_update[0]
return ""
try:
last_update = cur.execute("SELECT last_update FROM meta").fetchone()
if last_update:
return last_update[0]
return ""
except sqlite3.OperationalError:
return ""

0 comments on commit b0cef60

Please sign in to comment.