From 53b099f959636719525be988ee6e4a653f2d748f Mon Sep 17 00:00:00 2001 From: Tarek Ziade Date: Mon, 5 Apr 2010 21:54:35 +0200 Subject: auth=b'Basic ' will throw a SyntaxError on 2.5 --HG-- branch : distribute extra : rebase_source : cbac0260bc300fc00ce3517ecd96d5bedc5cd896 --- setuptools/command/upload_docs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/upload_docs.py') diff --git a/setuptools/command/upload_docs.py b/setuptools/command/upload_docs.py index e961a0df..381ba1df 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -92,7 +92,7 @@ class upload_docs(upload): 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() -- cgit v1.2.3