Patchwork [2,of,5] url: drop support for python2.5

login
register
mail settings
Submitter timeless@mozdev.org
Date Oct. 20, 2015, 12:33 a.m.
Message ID <30001a3db4191ec0eac6.1445301194@waste.org>
Download mbox | patch
Permalink /patch/11197/
State Superseded
Headers show

Comments

timeless@mozdev.org - Oct. 20, 2015, 12:33 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1444944068 14400
#      Thu Oct 15 17:21:08 2015 -0400
# Node ID 30001a3db4191ec0eac6c7b3519d7c04cfc57279
# Parent  5c265b92e735fa9db2879390597fe87344d3f831
url: drop support for python2.5

Patch

diff --git a/mercurial/url.py b/mercurial/url.py
--- a/mercurial/url.py
+++ b/mercurial/url.py
@@ -419,17 +419,8 @@ 
         if req is not self.retried_req:
             self.retried_req = req
             self.retried = 0
-        # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if
-        # it doesn't know about the auth type requested. This can happen if
-        # somebody is using BasicAuth and types a bad password.
-        try:
-            return urllib2.HTTPDigestAuthHandler.http_error_auth_reqed(
-                        self, auth_header, host, req, headers)
-        except ValueError as inst:
-            arg = inst.args[0]
-            if arg.startswith("AbstractDigestAuthHandler doesn't know "):
-                return
-            raise
+        return urllib2.HTTPDigestAuthHandler.http_error_auth_reqed(
+                    self, auth_header, host, req, headers)
 
 class httpbasicauthhandler(urllib2.HTTPBasicAuthHandler):
     def __init__(self, *args, **kwargs):