diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-27 12:53:34 +0000 |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-02-27 12:53:34 +0000 |
commit | dda92f7f02dbc0de94112599129d9d93192278d9 (patch) | |
tree | 8912eab7b7848c451a9aabc871682921776cee11 /Lib/distutils/command/upload.py | |
parent | b31a6d0949faecc933754f32ac956bc4aad76fff (diff) | |
download | cpython-git-dda92f7f02dbc0de94112599129d9d93192278d9.tar.gz |
Issue #5052: make Distutils compatible with 2.3 again.
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 e30347e507..df82e4ca56 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -6,7 +6,7 @@ from distutils.errors import * from distutils.core import PyPIRCCommand from distutils.spawn import spawn from distutils import log -from hashlib import md5 +import sys import os import socket import platform @@ -16,6 +16,11 @@ import urlparse import cStringIO as StringIO from ConfigParser import ConfigParser +# this keeps compatibility for 2.3 and 2.4 +if sys.version < "2.5": + from md5 import md5 +else: + from hashlib import md5 class upload(PyPIRCCommand): |