diff options
author | Tarek Ziade <tarek@ziade.org> | 2010-04-05 22:18:39 +0200 |
---|---|---|
committer | Tarek Ziade <tarek@ziade.org> | 2010-04-05 22:18:39 +0200 |
commit | 4c4b93069581da0279ef1b037367592040a25532 (patch) | |
tree | fbc624ecb355768084bae15ab6e7e470e9b66f54 /setuptools/command/upload_docs.py | |
parent | b14e668bcf14edef401cabe3b3b7014454f8cb94 (diff) | |
download | external_python_setuptools-4c4b93069581da0279ef1b037367592040a25532.tar.gz external_python_setuptools-4c4b93069581da0279ef1b037367592040a25532.tar.bz2 external_python_setuptools-4c4b93069581da0279ef1b037367592040a25532.zip |
proper fix to avoid a syntax error on 2.5
--HG--
branch : distribute
extra : rebase_source : 320da069dcb5d4c3ffb94e6e4f0e78a1bef8a305
Diffstat (limited to 'setuptools/command/upload_docs.py')
-rw-r--r-- | setuptools/command/upload_docs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index 381ba1df..17686265 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -91,8 +91,8 @@ class upload_docs(upload): credentials = self.username + ':' + self.password try: # base64 only works with bytes in Python 3. encoded_creds = base64.encodebytes(credentials.encode('utf8')) - auth = b"Basic " - except (AttributeError, SyntaxError): + auth = bytes("Basic ") + except AttributeError: encoded_creds = base64.encodestring(credentials) auth = "Basic " auth += encoded_creds.strip() |