From 4c4b93069581da0279ef1b037367592040a25532 Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 22:18:39 +0200 Subject: proper fix to avoid a syntax error on 2.5 --HG-- branch : distribute extra : rebase_source : 320da069dcb5d4c3ffb94e6e4f0e78a1bef8a305 --- setuptools/command/upload_docs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setuptools/command/upload_docs.py') 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() -- cgit v1.2.1