Commit 53b099f9 authored by Tarek Ziade's avatar Tarek Ziade

auth=b'Basic ' will throw a SyntaxError on 2.5

--HG--
branch : distribute
extra : rebase_source : cbac0260bc300fc00ce3517ecd96d5bedc5cd896
parent 38ae8ecb
......@@ -92,7 +92,7 @@ class upload_docs(upload):
try: # base64 only works with bytes in Python 3.
encoded_creds = base64.encodebytes(credentials.encode('utf8'))
auth = b"Basic "
except AttributeError:
except (AttributeError, SyntaxError):
encoded_creds = base64.encodestring(credentials)
auth = "Basic "
auth += encoded_creds.strip()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment