Ignore errors in do_window_cleanup to fix shutdown issue (#3142)
* Ignore errors in do_window_cleanup to fix shutdown issue * Only catch RuntimeError
This commit is contained in:
parent
351aa96dfc
commit
0a706c5dd9
|
@ -232,6 +232,7 @@ class ProgressManager:
|
|||
|
||||
next_levels = self._levels - 1
|
||||
next_levels = max(0, next_levels)
|
||||
try:
|
||||
if next_levels == 0:
|
||||
if self._win:
|
||||
self._closeWin()
|
||||
|
@ -246,6 +247,9 @@ class ProgressManager:
|
|||
self._backend_timer.stop()
|
||||
self._backend_timer.deleteLater()
|
||||
self._backend_timer = None
|
||||
except RuntimeError as exc:
|
||||
# during shutdown, the timers may have already been deleted by Qt
|
||||
print(f"do_window_cleanup error ignored: {exc}")
|
||||
self._levels = next_levels
|
||||
|
||||
# if the window is not currently shown, we can do cleanup immediately, if it is
|
||||
|
|
Loading…
Reference in New Issue