Fixed a porting bug related to the usage of zipfile.ZipFile.

Sun, 17 Jan 2010 19:16:21 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 17 Jan 2010 19:16:21 +0000
changeset 75
035e71f2edcd
parent 74
f0c0e4638a0f
child 76
2e74244db9bb

Fixed a porting bug related to the usage of zipfile.ZipFile.

PluginManager/PluginInstallDialog.py file | annotate | diff | comparison | revisions
PluginManager/PluginRepositoryDialog.py file | annotate | diff | comparison | revisions
Project/Project.py file | annotate | diff | comparison | revisions
--- a/PluginManager/PluginInstallDialog.py	Sun Jan 17 18:36:52 2010 +0000
+++ b/PluginManager/PluginInstallDialog.py	Sun Jan 17 19:16:21 2010 +0000
@@ -268,7 +268,7 @@
                             """writeable. Aborting...</p>""").format(destination), \
                 False
         
-        zip = zipfile.ZipFile(archive, "rb")
+        zip = zipfile.ZipFile(archive, "r")
         
         # check, if the archive contains a valid plugin
         pluginFound = False
@@ -561,4 +561,4 @@
         self.resize(size)
         
         self.connect(self.cw.buttonBox, SIGNAL("accepted()"), self.close)
-        self.connect(self.cw.buttonBox, SIGNAL("rejected()"), self.close)
\ No newline at end of file
+        self.connect(self.cw.buttonBox, SIGNAL("rejected()"), self.close)
--- a/PluginManager/PluginRepositoryDialog.py	Sun Jan 17 18:36:52 2010 +0000
+++ b/PluginManager/PluginRepositoryDialog.py	Sun Jan 17 19:16:21 2010 +0000
@@ -502,7 +502,7 @@
         if not zipfile.is_zipfile(archive):
             return False
         
-        zip = zipfile.ZipFile(archive, "rb")
+        zip = zipfile.ZipFile(archive, "r")
         try:
             aversion = zip.read("VERSION").decode("utf-8")
         except KeyError:
@@ -644,4 +644,4 @@
                 ).format(applPath),
                 self.trUtf8('OK'))
         
-        self.close()
\ No newline at end of file
+        self.close()
--- a/Project/Project.py	Sun Jan 17 18:36:52 2010 +0000
+++ b/Project/Project.py	Sun Jan 17 19:16:21 2010 +0000
@@ -4447,9 +4447,9 @@
             os.path.join(self.ppath, self.pdata["MAINSCRIPT"][0].replace(".py", ".zip"))
         try:
             try:
-                archiveFile = zipfile.ZipFile(archive, "wb", zipfile.ZIP_DEFLATED)
+                archiveFile = zipfile.ZipFile(archive, "w", zipfile.ZIP_DEFLATED)
             except RuntimeError:
-                archiveFile = zipfile.ZipFile(archive, "wb")
+                archiveFile = zipfile.ZipFile(archive, "w")
         except IOError as why:
             QMessageBox.critical(None,
                 self.trUtf8("Create Plugin Archive"),

eric ide

mercurial