[PATCH] keepalive: remove useless parenthesis around exception type

Gregory Szorc gregory.szorc at gmail.com
Sun Feb 28 08:03:37 UTC 2016


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1456646413 28800
#      Sun Feb 28 00:00:13 2016 -0800
# Node ID 099bd4bb630d8178798998c7b47ec4c62209404a
# Parent  10e0eadd36d014a7824be5c3cc0d1071ecf9e885
keepalive: remove useless parenthesis around exception type

diff --git a/mercurial/keepalive.py b/mercurial/keepalive.py
--- a/mercurial/keepalive.py
+++ b/mercurial/keepalive.py
@@ -340,17 +340,17 @@ class KeepAliveHandler(object):
                 h.putrequest('POST', req.get_selector(), **skipheaders)
                 if 'content-type' not in headers:
                     h.putheader('Content-type',
                                 'application/x-www-form-urlencoded')
                 if 'content-length' not in headers:
                     h.putheader('Content-length', '%d' % len(data))
             else:
                 h.putrequest('GET', req.get_selector(), **skipheaders)
-        except (socket.error) as err:
+        except socket.error as err:
             raise urllib2.URLError(err)
         for k, v in headers.items():
             h.putheader(k, v)
         h.endheaders()
         if req.has_data():
             h.send(data)
 
 class HTTPHandler(KeepAliveHandler, urllib2.HTTPHandler):


More information about the Mercurial-devel mailing list