Skip to content

Commit 6970c0b

Browse files
author
lordhellcito
committed
Update pep8.py
Windows throws an AttributeError exception instead ValueError when calls signal.SIGPIPE.
1 parent a176b77 commit 6970c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pep8.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ def _main():
19181918
# Handle "Broken pipe" gracefully
19191919
try:
19201920
signal.signal(signal.SIGPIPE, lambda signum, frame: sys.exit(1))
1921-
except ValueError:
1921+
except AttributeError:
19221922
pass # not supported on Windows
19231923

19241924
pep8style = StyleGuide(parse_argv=True, config_file=True)

0 commit comments

Comments
 (0)