changeset 41288: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
parents c0221d929eb9
children 593f6359681d
files mercurial/scmutil.py
diffstat 1 files changed, 0 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Wed Jan 16 21:32:15 2019 -0800
+++ b/mercurial/scmutil.py	Wed Jan 16 16:49:15 2019 -0800
@@ -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