Commits

Anonymous committed 12197b5 Merge

Fix bootstrap issue by importing the cgi module lazily

  • Participants
  • Parent commits d69ba24, 3c449a0

Comments (0)

Files changed (1)

File Lib/distutils/config.py

 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
 
 
     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)