Handle broken pipe exceptions more effectively
This commit is contained in:
parent
9913b9915f
commit
1c0a029ca6
|
@ -20,6 +20,7 @@ import re
|
||||||
import csv
|
import csv
|
||||||
import sys
|
import sys
|
||||||
import math
|
import math
|
||||||
|
import errno
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
import timeit
|
import timeit
|
||||||
|
@ -1240,8 +1241,10 @@ def shell():
|
||||||
try:
|
try:
|
||||||
print_(line)
|
print_(line)
|
||||||
server_list.append(line)
|
server_list.append(line)
|
||||||
except BROKEN_PIPE_ERROR:
|
except IOError:
|
||||||
pass
|
e = sys.exc_info()[1]
|
||||||
|
if e.errno != errno.EPIPE:
|
||||||
|
raise
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
# Set a filter of servers to retrieve
|
# Set a filter of servers to retrieve
|
||||||
|
|
Loading…
Reference in New Issue