Skip to content

Commit

Permalink
cvat-sdk/gen/postprocess.py: don't suppress exceptions from `process_…
Browse files Browse the repository at this point in the history
…file` (#5740)

Suppressing the exception means that the script returns a success exit
code (preventing errors from being noticed) and that the stacktrace is
omitted from the output (preventing errors from being easily analyzed).
  • Loading branch information
SpecLad authored Feb 21, 2023
1 parent 76f7156 commit d0c419c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cvat-sdk/gen/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def process_dir(self, dir_path: str, *, file_ext: str = ".py"):
try:
self.process_file(filename)
except Exception as e:
print(f"Failed to process file '{osp.basename(filename)}': {e}")
raise RuntimeError(f"Failed to process file {filename!r}") from e


def parse_schema(path):
Expand Down

0 comments on commit d0c419c

Please sign in to comment.