diff mercurial/scmutil.py @ 42074:17941fc53ae9

scmutil: drop unreachable except clause socket.error is a subclass of IOError, which we catch higher up. It seems to have been this way since 020a896a5292 (dispatch: sort exception handlers, 2009-01-12), so let's celebrate the 10 year anniversary (a few days late) of it being wrong by deleting it. Differential Revision: https://phab.mercurial-scm.org/D5626
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 16 Jan 2019 16:49:15 -0800 (2019-01-17)
parents 24a1f67bb75a
children 5079242abef9
line wrap: on
line diff
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -12,7 +12,6 @@
 import hashlib
 import os
 import re
-import socket
 import subprocess
 import weakref
 
@@ -270,8 +269,6 @@
         # Commands shouldn't sys.exit directly, but give a return code.
         # Just in case catch this and and pass exit code to caller.
         return inst.code
-    except socket.error as inst:
-        ui.error(_("abort: %s\n") % stringutil.forcebytestr(inst.args[-1]))
 
     return -1