Skip to content

Commit 9754e46

Browse files
authored
update_obsdb: fix how list of bad books is maintained (#1339)
In case of failure, this was erroneously adding the last scanned book to the list instead of the failed one.
1 parent 16f3b1b commit 9754e46

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sotodlib/site_pipeline/update_obsdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def main(config: str,
213213
logger.info(f"Ran check_book in {time.time()-t1} s")
214214
except Exception as e:
215215
if config_dict["skip_bad_books"]:
216+
_, book_id = os.path.split(bookpath)
216217
config_dict["known_bad_books"].append(book_id)
217218
logger.error(f"failed to add {bookpath}. There are now {len(config_dict['known_bad_books'])} known bad books.")
218219
bad_book_counter +=1

0 commit comments

Comments
 (0)