diff options
-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() |