--- a/PluginManager/PluginInstallDialog.py Tue Mar 07 18:53:18 2017 +0100 +++ b/PluginManager/PluginInstallDialog.py Tue Mar 07 19:46:57 2017 +0100 @@ -291,12 +291,12 @@ """writeable. Aborting...</p>""").format(destination), \ False - zip = zipfile.ZipFile(archive, "r") + zipFile = zipfile.ZipFile(archive, "r") # check, if the archive contains a valid plugin pluginFound = False pluginFileName = "" - for name in zip.namelist(): + for name in zipFile.namelist(): if self.__pluginManager.isValidPluginName(name): installedPluginName = name[:-3] pluginFound = True @@ -311,7 +311,7 @@ False # parse the plugin module's plugin header - pluginSource = Utilities.decode(zip.read(pluginFileName))[0] + pluginSource = Utilities.decode(zipFile.read(pluginFileName))[0] packageName = "" internalPackages = [] needsRestart = False @@ -411,7 +411,7 @@ self.__installedFiles = [] try: if packageName != "None": - namelist = sorted(zip.namelist()) + namelist = sorted(zipFile.namelist()) tot = len(namelist) prog = 0 self.progress.setMaximum(tot) @@ -436,7 +436,7 @@ if not os.path.exists(d): self.__makedirs(d) f = open(outname, "wb") - f.write(zip.read(name)) + f.write(zipFile.read(name)) f.close() self.__installedFiles.append(outname) self.progress.setValue(tot) @@ -475,13 +475,13 @@ # now compile the plugins if doCompile: - dir = os.path.join(destination, packageName) + dirName = os.path.join(destination, packageName) files = os.path.join(destination, pluginFileName) if sys.version_info[0] == 2: - dir = dir.encode(sys.getfilesystemencoding()) + dirName = dirName.encode(sys.getfilesystemencoding()) files = files.encode(sys.getfilesystemencoding()) os.path.join_unicode = False - compileall.compile_dir(dir, quiet=True) + compileall.compile_dir(dirName, quiet=True) compileall.compile_file(files, quiet=True) os.path.join_unicode = True