diff bitten/slave.py @ 895:7d93d6358fe0

Use our own HTTPBasicAuthHandler under Python 2.6 to avoid issue http://bugs.python.org/issue8797. Fixes #658.
author hodgestar
date Wed, 09 Mar 2011 14:48:35 +0000
parents 60d0807334ec
children ce35ae342a66
line wrap: on
line diff
--- a/bitten/slave.py
+++ b/bitten/slave.py
@@ -34,6 +34,7 @@
 from bitten.build.config import Configuration, ConfigFileNotFound
 from bitten.recipe import Recipe
 from bitten.util import xmlio
+from bitten.util.compat import HTTPBasicAuthHandler
 
 EX_OK = getattr(os, "EX_OK", 0)
 EX_UNAVAILABLE = getattr(os, "EX_UNAVAILABLE", 69)
@@ -262,7 +263,7 @@
 
     def _get_opener(self):
         opener = urllib2.build_opener(urllib2.HTTPErrorProcessor())
-        opener.add_handler(urllib2.HTTPBasicAuthHandler(self.password_mgr))
+        opener.add_handler(HTTPBasicAuthHandler(self.password_mgr))
         opener.add_handler(urllib2.HTTPDigestAuthHandler(self.password_mgr))
         opener.add_handler(urllib2.HTTPCookieProcessor(self.cookiejar))
         return opener
Copyright (C) 2012-2017 Edgewall Software