From b660539c4ac691312b44c13c6311568749537290 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 11 Oct 2011 15:58:07 -0700 Subject: [PATCH] Fix sync on Python 2.6.6 Python 2.6.6 has the same bug as Python 2.7, where HTTP authentication just stops working, but does not have the setter method to clear the retry counter. Work around by setting the field directly if it exists. Change-Id: I6a742e606bb7750dc66c33fc7c5d1310541db2c8 Signed-off-by: Shawn O. Pearce --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index fda81038..9bd4b457 100755 --- a/main.py +++ b/main.py @@ -287,6 +287,8 @@ class _BasicAuthHandler(urllib2.HTTPBasicAuthHandler): reset = getattr(self, 'reset_retry_count', None) if reset is not None: reset() + elif getattr(self, 'retried', None): + self.retried = 0 raise def init_http():