Commits

Tarek Ziadé committed acc3601

proper fix to avoid a syntax error on 2.5

  • Participants
  • Parent commits 19f786a
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File setuptools/command/upload_docs.py

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