diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-16 02:06:59 +0000 |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-05-16 02:06:59 +0000 |
commit | eb8cef26648d7d443a5570a2e653d9d07c284c42 (patch) | |
tree | 7dd5905787f5c53675e55422a999b54ccd51bfde /Lib/distutils/command/upload.py | |
parent | fa40bbf6252d224fb479d051d236edf6a79a0c8d (diff) | |
download | cpython-git-eb8cef26648d7d443a5570a2e653d9d07c284c42.tar.gz |
Fixed import of configparser in the distutils module.
If configparser is unavailable, try to import configparser using its
old name. This is required for backward-compatibility with older
Python versions.
Diffstat (limited to 'Lib/distutils/command/upload.py')
-rw-r--r-- | Lib/distutils/command/upload.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index daf681128d..92c4bf204e 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -10,11 +10,16 @@ from hashlib import md5 import os import socket import platform -import ConfigParser import httplib import base64 import urlparse import cStringIO as StringIO +try: + from configparser import ConfigParser +except ImportError: + # For backward-compatibility with Python versions < 2.6. + from ConfigParser import ConfigParser + class upload(PyPIRCCommand): |