Skip to content

Commit 56d211c

Browse files
committed
Merge pull request #275 from winny-/master
Handle broken pipe in check_files()
2 parents b14a97e + 69e2b69 commit 56d211c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pep8.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
import inspect
5656
import keyword
5757
import tokenize
58+
import errno
5859
from optparse import OptionParser
5960
from fnmatch import fnmatch
6061
try:
@@ -1672,6 +1673,9 @@ def check_files(self, paths=None):
16721673
runner(path)
16731674
except KeyboardInterrupt:
16741675
print('... stopped')
1676+
except IOError as e:
1677+
if e.errno != errno.EPIPE:
1678+
raise e
16751679
report.stop()
16761680
return report
16771681

0 commit comments

Comments
 (0)