From: Kenneth Reitz Date: Sun, 23 Oct 2011 16:26:46 +0000 (-0400) Subject: auth tuple fix X-Git-Tag: v0.7.1~1^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12db1576e9d0ed897f799a8f382ee92db891988d;p=services%2Fpython-requests.git auth tuple fix --- diff --git a/requests/auth.py b/requests/auth.py index 6825441..d59a687 100644 --- a/requests/auth.py +++ b/requests/auth.py @@ -40,7 +40,7 @@ def dispatch(t): t = list(t) # Make sure they're passing in something. - assert len(t) <= 2 + assert len(t) >= 2 # If only two items are passed in, assume HTTPBasic. if (len(t) == 2): @@ -54,6 +54,6 @@ def dispatch(t): t[0] = http_digest # Return a custom callable. - return (t[0], t[1:]) + return (t[0], tuple(t[1:]))