support for building with scons & python 2.4x
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jun 2010 23:37:51 +0000 (23:37 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jun 2010 23:37:51 +0000 (23:37 +0000)
tools/Blender.py

index 69f6850fa52df68920399b9153f7287f742e6fb3..d1a2170b0321b181670ac9d98a6f62cb193a208a 100644 (file)
@@ -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