Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e62a4040
Commit
e62a4040
authored
Dec 22, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bootstrap issue by importing the cgi module lazily
parent
335a5128
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Lib/distutils/config.py
Lib/distutils/config.py
+1
-1
No files found.
Lib/distutils/config.py
View file @
e62a4040
...
...
@@ -3,7 +3,6 @@
Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import
cgi
import
os
from
configparser
import
ConfigParser
...
...
@@ -104,6 +103,7 @@ class PyPIRCCommand(Command):
def
_read_pypi_response
(
self
,
response
):
"""Read and decode a PyPI HTTP response."""
import
cgi
content_type
=
response
.
getheader
(
'content-type'
,
'text/plain'
)
encoding
=
cgi
.
parse_header
(
content_type
)[
1
].
get
(
'charset'
,
'ascii'
)
return
response
.
read
().
decode
(
encoding
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment