Skip to content

Commit

Permalink
updates for handling returns
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael McCrackan committed Jan 2, 2025
1 parent 9f19b4d commit 7d1096e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sotodlib/preprocess/preprocess_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,8 @@ def cleanup_mandb(error, outputs, configs, logger=None, overwrite=False):
errlog = os.path.join(folder, 'errlog.txt')
f = open(errlog, 'a')
f.write(f'{time.time()}, {error}\n')
f.write(f'\t{outputs[0]}\n\t{outputs[1]}\n')
if outputs is not None:
f.write(f'\t{outputs[0]}\n\t{outputs[1]}\n')
f.close()


Expand Down
2 changes: 1 addition & 1 deletion sotodlib/site_pipeline/preprocess_tod.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def main(
continue
futures.remove(future)

if err is None and db_datasets:
if db_datasets:
logger.info(f'Processing future result db_dataset: {db_datasets}')
for db_dataset in db_datasets:
pp_util.cleanup_mandb(err, db_dataset, configs, logger)
Expand Down

0 comments on commit 7d1096e

Please sign in to comment.