59 pluginDirectory = self.pluginDirectoryCombo\ |
59 pluginDirectory = self.pluginDirectoryCombo\ |
60 .itemData(index) |
60 .itemData(index) |
61 pluginNames = sorted(self.__pluginManager.getPluginModules(pluginDirectory)) |
61 pluginNames = sorted(self.__pluginManager.getPluginModules(pluginDirectory)) |
62 self.pluginNameCombo.clear() |
62 self.pluginNameCombo.clear() |
63 for pluginName in pluginNames: |
63 for pluginName in pluginNames: |
64 fname = "%s.py" % os.path.join(pluginDirectory, pluginName) |
64 fname = "{0}.py".format(os.path.join(pluginDirectory, pluginName)) |
65 self.pluginNameCombo.addItem(pluginName, fname) |
65 self.pluginNameCombo.addItem(pluginName, fname) |
66 self.buttonBox.button(QDialogButtonBox.Ok)\ |
66 self.buttonBox.button(QDialogButtonBox.Ok)\ |
67 .setEnabled(self.pluginNameCombo.currentText() != "") |
67 .setEnabled(self.pluginNameCombo.currentText() != "") |
68 |
68 |
69 @pyqtSlot() |
69 @pyqtSlot() |
127 |
127 |
128 try: |
128 try: |
129 if packageDir and os.path.exists(packageDir): |
129 if packageDir and os.path.exists(packageDir): |
130 shutil.rmtree(packageDir) |
130 shutil.rmtree(packageDir) |
131 |
131 |
132 fnameo = "%so" % pluginFile |
132 fnameo = "{0}o".format(pluginFile) |
133 if os.path.exists(fnameo): |
133 if os.path.exists(fnameo): |
134 os.remove(fnameo) |
134 os.remove(fnameo) |
135 |
135 |
136 fnamec = "%sc" % pluginFile |
136 fnamec = "{0}c".format(pluginFile) |
137 if os.path.exists(fnamec): |
137 if os.path.exists(fnamec): |
138 os.remove(fnamec) |
138 os.remove(fnamec) |
139 |
139 |
140 os.remove(pluginFile) |
140 os.remove(pluginFile) |
141 except OSError as err: |
141 except OSError as err: |