We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9a672b3 + 6fc61b4 commit 43ffceaCopy full SHA for 43ffcea
1 file changed
progressbar/bar.py
@@ -63,6 +63,7 @@ def __init__(self, term_width=None, **kwargs):
63
try:
64
self._handle_resize()
65
import signal
66
+ self._prev_handle = signal.getsignal(signal.SIGWINCH)
67
signal.signal(signal.SIGWINCH, self._handle_resize)
68
self.signal_set = True
69
except Exception: # pragma: no cover
@@ -79,7 +80,7 @@ def finish(self): # pragma: no cover
79
80
if self.signal_set:
81
82
- signal.signal(signal.SIGWINCH, signal.SIG_DFL)
83
+ signal.signal(signal.SIGWINCH, self._prev_handle)
84
except Exception: # pragma no cover
85
pass
86
0 commit comments