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 | b46c672eb0808b588cb8af406bb998a8f25a6a19 (patch) | |
| tree | 8477c27cadf7144ec4afae01194802dd3804c1e2 /setuptools/command/upload_docs.py | |
| parent | 0de64dfaaec05c8bf2739569421420c978d521f0 (diff) | |
| download | python-setuptools-bitbucket-b46c672eb0808b588cb8af406bb998a8f25a6a19.tar.gz | |
proper fix to avoid a syntax error on 2.5
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() |
