Skip to content

Commit

Permalink
add try except for log tree
Browse files Browse the repository at this point in the history
  • Loading branch information
cxnt committed Oct 6, 2023
1 parent f567a77 commit ed9947a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ def export_to_coco(api: sly.Api, task_id, context, state, app_logger):

sly.logger.info(f"Dataset [{dataset.name}] processed!")

sly.fs.log_tree(g.storage_dir, sly.logger, level="info")
try:
sly.fs.log_tree(g.storage_dir, sly.logger, level="info")
except:
sly.logger.warn("Can not log storage tree")

full_archive_name = f"{task_id}_{g.project.name}.tar"
result_archive = os.path.join(g.my_app.data_dir, full_archive_name)
Expand Down

0 comments on commit ed9947a

Please sign in to comment.