summaryrefslogtreecommitdiff
path: root/setuptools/command/upload_docs.py
diff options
context:
space:
mode:
authorTarek Ziade <tarek@ziade.org>2010-04-05 21:54:35 +0200
committerTarek Ziade <tarek@ziade.org>2010-04-05 21:54:35 +0200
commit53b099f959636719525be988ee6e4a653f2d748f (patch)
treee17497f481685b9eeaf194e0eb378b61c5586c8e /setuptools/command/upload_docs.py
parent38ae8ecbdc6a9f285a56add8c695b10b2786c679 (diff)
downloadpython-setuptools-git-53b099f959636719525be988ee6e4a653f2d748f.tar.gz
auth=b'Basic ' will throw a SyntaxError on 2.5
--HG-- branch : distribute extra : rebase_source : cbac0260bc300fc00ce3517ecd96d5bedc5cd896
Diffstat (limited to 'setuptools/command/upload_docs.py')
-rw-r--r--setuptools/command/upload_docs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py
index e961a0df..381ba1df 100644
--- a/setuptools/command/upload_docs.py
+++ b/setuptools/command/upload_docs.py
@@ -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()