Skip to content

Commit 326f17e

Browse files
authored
FIX: Use except Exception instead of bare except (vqdang#237)
A bare `except` will catch `KeyboardInterrupt` and `SystemExit`, making it hard to stop the program with control+C. Using `except Exception` will catch all other exceptions.
1 parent 842964d commit 326f17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infer/wsi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ def process_wsi_list(self, run_args):
745745
log_info("Process: %s" % wsi_base_name)
746746
self.process_single_file(wsi_path, msk_path, self.output_dir)
747747
log_info("Finish")
748-
except:
748+
except Exception:
749749
logging.exception("Crash")
750750
rm_n_mkdir(self.cache_path) # clean up all cache
751751
return

0 commit comments

Comments
 (0)