diff -r d60678a567a9 -r 328739ea70c3 mercurial/httpconnection.py --- a/mercurial/httpconnection.py Tue Jun 23 22:38:21 2015 -0700 +++ b/mercurial/httpconnection.py Tue Jun 23 22:20:08 2015 -0700 @@ -211,7 +211,7 @@ path = '/' + path h.request(req.get_method(), path, req.data, headers) r = h.getresponse() - except socket.error, err: # XXX what error? + except socket.error as err: # XXX what error? raise urllib2.URLError(err) # Pick apart the HTTPResponse object to get the addinfourl