Patchwork keepalive: remove useless parenthesis around exception type

login
register
mail settings
Submitter Gregory Szorc
Date Feb. 28, 2016, 8:03 a.m.
Message ID <099bd4bb630d81787989.1456646617@ubuntu-vm-main>
Download mbox | patch
Permalink /patch/13456/
State Accepted
Headers show

Comments

Gregory Szorc - Feb. 28, 2016, 8:03 a.m.
# HG changeset patch
# User Gregory Szorc <gregory.szorc@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
Martin von Zweigbergk - Feb. 29, 2016, 5:39 a.m.
Thanks, pushed to the clowncopter.

Patch

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):