summaryrefslogtreecommitdiff
path: root/Lib/distutils/command/register.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-12-22 18:13:51 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2013-12-22 18:13:51 +0100
commit335a5128e54809b789cb82f05a913df1198fe40e (patch)
treece11198fa8b74db7dfc864c66a8cb5944e2b84ba /Lib/distutils/command/register.py
parentf20ea1399638d72f8d99df7960cdb31f37a31f81 (diff)
downloadcpython-git-335a5128e54809b789cb82f05a913df1198fe40e.tar.gz
Fix TypeError on "setup.py upload --show-response".
Diffstat (limited to 'Lib/distutils/command/register.py')
-rw-r--r--Lib/distutils/command/register.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index 9b39ed36aa..55656c2353 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -5,7 +5,6 @@ Implements the Distutils 'register' command (register with the repository).
# created 2002/10/21, Richard Jones
-import cgi
import os, string, getpass
import io
import urllib.parse, urllib.request
@@ -88,9 +87,7 @@ class register(PyPIRCCommand):
'''
url = self.repository+'?:action=list_classifiers'
response = urllib.request.urlopen(url)
- content_type = response.getheader('content-type', 'text/plain')
- encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
- log.info(response.read().decode(encoding))
+ log.info(self._read_pypi_response(response))
def verify_metadata(self):
''' Send the metadata to the package index server to be checked.