Don't crash when failing to update note_search DB.
This commit is contained in:
parent
613aa4c88f
commit
847e2cfd74
@ -108,7 +108,13 @@ def load_all(top_dir_relative):
|
||||
def regen_all(src_top, dest_top, *, docs=None, db=None):
|
||||
files_generated = 0
|
||||
cur = db.cursor()
|
||||
cleaned_db = False
|
||||
|
||||
try:
|
||||
cur.execute('DELETE FROM note_search;')
|
||||
cleaned_db = True
|
||||
except sqlite3.OperationalError as err:
|
||||
logging.warn("Error pre-cleaning DB, search won't be updated")
|
||||
|
||||
docs = load_all(src_top)
|
||||
doc_to_headline_remapping = {}
|
||||
|
Loading…
Reference in New Issue
Block a user