auth tuple fix
authorKenneth Reitz <me@kennethreitz.com>
Sun, 23 Oct 2011 16:26:46 +0000 (12:26 -0400)
committerKenneth Reitz <me@kennethreitz.com>
Sun, 23 Oct 2011 16:26:46 +0000 (12:26 -0400)
requests/auth.py

index 6825441caf27aaf94f1b840bebcb3276c2291d88..d59a68740dcd62822197527480aa45283590c61d 100644 (file)
@@ -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:]))