handle BaseExceptions properly

This commit is contained in:
Nick Sweeting 2021-04-08 06:08:17 -04:00
parent 87970a254f
commit 2e57df917e
2 changed files with 7 additions and 2 deletions

View file

@ -157,7 +157,10 @@ class TimedProgress:
# kill the progress bar subprocess
try:
self.p.close() # must be closed *before* its terminnated
except BaseException:
except (KeyboardInterrupt, SystemExit):
print()
raise
except BaseException: # lgtm [py/catch-base-exception]
pass
self.p.terminate()
self.p.join()