diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-06-04 03:37:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-06-04 03:37:51 +0400 |
commit | ab5367e09f9cfc332a171099385e2c1b6d7516da (patch) | |
tree | 8710645eaba91bd9a05c1341f0dff6de4a0c641a /tools/Blender.py | |
parent | 0729a58224f08ee32b034c53838aaf40aefcaae1 (diff) |
support for building with scons & python 2.4x
Diffstat (limited to 'tools/Blender.py')
-rw-r--r-- | tools/Blender.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/Blender.py b/tools/Blender.py index 69f6850fa52..d1a2170b032 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -356,7 +356,11 @@ class CompZipFile(zipfile.ZipFile): """Partial copy of python2.6's zipfile.ZipFile (see http://www.python.org) to get a extractall() that works on py2.5 and probably earlier distributions.""" def __init__(self, file, mode="r", compression=zipfile.ZIP_STORED, allowZip64=False): - zipfile.ZipFile.__init__(self, file, mode, compression, allowZip64) + if sys.version_info < (2, 6): + zipfile.ZipFile.__init__(self, file, mode, compression) + else: + zipfile.ZipFile.__init__(self, file, mode, compression, allowZip64) + if not hasattr(self,"extractall"): # use our method print "Debug: Using comp_extractall!" self.extractall= self.comp_extractall |