diff options
author | Hugo <hugovk@users.noreply.github.com> | 2020-01-08 19:10:11 +0200 |
---|---|---|
committer | Hugo <hugovk@users.noreply.github.com> | 2020-01-08 19:10:11 +0200 |
commit | 796abd8dbec884cedf326cb5f85512a5d5648c4e (patch) | |
tree | cacbbdc28822b519f87b679a8262687421d13c01 /setuptools/command/upload_docs.py | |
parent | 7e97def47723303fafabe48b22168bbc11bb4821 (diff) | |
download | python-setuptools-git-796abd8dbec884cedf326cb5f85512a5d5648c4e.tar.gz |
Fix for Python 4: replace unsafe six.PY3 with PY2
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 07aa564a..130a0cb6 100644 --- a/setuptools/command/upload_docs.py +++ b/setuptools/command/upload_docs.py @@ -24,7 +24,7 @@ from .upload import upload def _encode(s): - errors = 'surrogateescape' if six.PY3 else 'strict' + errors = 'strict' if six.PY2 else 'surrogateescape' return s.encode('utf-8', errors) @@ -153,7 +153,7 @@ class upload_docs(upload): # set up the authentication credentials = _encode(self.username + ':' + self.password) credentials = standard_b64encode(credentials) - if six.PY3: + if not six.PY2: credentials = credentials.decode('ascii') auth = "Basic " + credentials |