Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43ffcea

Browse filesBrowse files
authored
Merge pull request wolph#85 from raingo/develop
restore, rather than overwrite, sigwinch signal
2 parents 9a672b3 + 6fc61b4 commit 43ffcea
Copy full SHA for 43ffcea

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎progressbar/bar.py‎

Copy file name to clipboardExpand all lines: progressbar/bar.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(self, term_width=None, **kwargs):
6363
try:
6464
self._handle_resize()
6565
import signal
66+
self._prev_handle = signal.getsignal(signal.SIGWINCH)
6667
signal.signal(signal.SIGWINCH, self._handle_resize)
6768
self.signal_set = True
6869
except Exception: # pragma: no cover
@@ -79,7 +80,7 @@ def finish(self): # pragma: no cover
7980
if self.signal_set:
8081
try:
8182
import signal
82-
signal.signal(signal.SIGWINCH, signal.SIG_DFL)
83+
signal.signal(signal.SIGWINCH, self._prev_handle)
8384
except Exception: # pragma no cover
8485
pass
8586

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.