Commits

Tarek Ziadé  committed c168996

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

  • Participants
  • Parent commits 1cec439
  • Branches 0.6-maintenance

Comments (0)

Files changed (1)

File setuptools/command/upload_docs.py

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