diff options
-rw-r--r-- | Lib/zipfile.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 31000ac..9af2986 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -5,6 +5,7 @@ import struct, os, time, sys, shutil import binascii, cStringIO, stat import io import re +import string try: import zlib # We may need its compression method @@ -1052,7 +1053,7 @@ class ZipFile(object): # filter illegal characters on Windows if os.path.sep == '\\': illegal = ':<>|"?*' - table = str.maketrans(illegal, '_' * len(illegal)) + table = string.maketrans(illegal, '_' * len(illegal)) arcname = arcname.translate(table) targetpath = os.path.join(targetpath, arcname) |