Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 335a512 commit e62a404Copy full SHA for e62a404
1 file changed
Lib/distutils/config.py
@@ -3,7 +3,6 @@
3
Provides the PyPIRCCommand class, the base class for the command classes
4
that uses .pypirc in the distutils.command package.
5
"""
6
-import cgi
7
import os
8
from configparser import ConfigParser
9
@@ -104,6 +103,7 @@ def _read_pypirc(self):
104
103
105
def _read_pypi_response(self, response):
106
"""Read and decode a PyPI HTTP response."""
+ import cgi
107
content_type = response.getheader('content-type', 'text/plain')
108
encoding = cgi.parse_header(content_type)[1].get('charset', 'ascii')
109
return response.read().decode(encoding)
0 commit comments