Skip to content

Commit e879b02

Browse files
committed
Catch socket/connectivity errors. Do not spit out traceback. Fix #349.
1 parent cdc5c3c commit e879b02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pip/basecommand.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,11 @@ def main(self, args, initial_options):
129129
logger.info('Exception information:\n%s' % format_exc())
130130
store_log = True
131131
exit = ERROR
132+
except socket.error:
133+
e_info = sys.exc_info()[1]
134+
logger.fatal('ERROR: Some connectivity problem: %s' % e_info)
135+
store_log = True
136+
exit = ERROR
132137
except:
133138
logger.fatal('Exception:\n%s' % format_exc())
134139
store_log = True

0 commit comments

Comments
 (0)