Thu, 05 Sep 2013 18:31:35 +0200
Fixed an issue in the plug-in manager causing a traceback when installing a new plug-in version of an already loaded one.
--- a/APIs/Python3/eric5.api Thu Sep 05 18:15:10 2013 +0200 +++ b/APIs/Python3/eric5.api Thu Sep 05 18:31:35 2013 +0200 @@ -3687,7 +3687,7 @@ eric5.PluginManager.PluginManager.PluginManager.preferencesChanged?4() eric5.PluginManager.PluginManager.PluginManager.removePluginFromSysModules?4(pluginName, package, internalPackages) eric5.PluginManager.PluginManager.PluginManager.shutdown?7 -eric5.PluginManager.PluginManager.PluginManager.unloadPlugin?4(name, directory) +eric5.PluginManager.PluginManager.PluginManager.unloadPlugin?4(name) eric5.PluginManager.PluginManager.PluginManager?1(parent=None, doLoadPlugins=True, develPlugin=None) eric5.PluginManager.PluginRepositoryDialog.PluginRepositoryDialog.getDownloadedPlugins?4() eric5.PluginManager.PluginRepositoryDialog.PluginRepositoryDialog?1(parent=None)
--- a/Documentation/Source/eric5.PluginManager.PluginManager.html Thu Sep 05 18:15:10 2013 +0200 +++ b/Documentation/Source/eric5.PluginManager.PluginManager.html Thu Sep 05 18:31:35 2013 +0200 @@ -670,16 +670,13 @@ </dd> </dl><a NAME="PluginManager.unloadPlugin" ID="PluginManager.unloadPlugin"></a> <h4>PluginManager.unloadPlugin</h4> -<b>unloadPlugin</b>(<i>name, directory</i>) +<b>unloadPlugin</b>(<i>name</i>) <p> Public method to unload a plugin module. </p><dl> <dt><i>name</i></dt> <dd> name of the module to be unloaded (string) -</dd><dt><i>directory</i></dt> -<dd> -name of the plugin directory (string) </dd> </dl><dl> <dt>Returns:</dt>
--- a/PluginManager/PluginInstallDialog.py Thu Sep 05 18:15:10 2013 +0200 +++ b/PluginManager/PluginInstallDialog.py Thu Sep 05 18:31:35 2013 +0200 @@ -366,7 +366,7 @@ (self.__pluginManager.isPluginLoaded(installedPluginName) and \ self.__pluginManager.isPluginActive(installedPluginName)) # try to unload a plugin with the same name - self.__pluginManager.unloadPlugin(installedPluginName, destination) + self.__pluginManager.unloadPlugin(installedPluginName) # uninstall existing plugin first to get clean conditions self.__uninstallPackage(destination, pluginFileName, packageName)
--- a/PluginManager/PluginManager.py Thu Sep 05 18:15:10 2013 +0200 +++ b/PluginManager/PluginManager.py Thu Sep 05 18:31:35 2013 +0200 @@ -333,33 +333,27 @@ print("Error loading plugin module:", name) print(str(err)) - def unloadPlugin(self, name, directory): + def unloadPlugin(self, name): """ Public method to unload a plugin module. @param name name of the module to be unloaded (string) - @param directory name of the plugin directory (string) @return flag indicating success (boolean) """ - fname = "{0}.py".format(os.path.join(directory, name)) - if name in self.__onDemandActiveModules and \ - self.__onDemandActiveModules[name].eric5PluginModuleFilename == fname: + if name in self.__onDemandActiveModules: # cannot unload an ondemand plugin, that is in use return False - if name in self.__activeModules and \ - self.__activeModules[name].eric5PluginModuleFilename == fname: + if name in self.__activeModules: self.deactivatePlugin(name) - if name in self.__inactiveModules and \ - self.__inactiveModules[name].eric5PluginModuleFilename == fname: + if name in self.__inactiveModules: try: del self.__inactivePlugins[name] except KeyError: pass del self.__inactiveModules[name] - elif name in self.__onDemandInactiveModules and \ - self.__onDemandInactiveModules[name].eric5PluginModuleFilename == fname: + elif name in self.__onDemandInactiveModules: try: del self.__onDemandInactivePlugins[name] except KeyError:
--- a/PluginManager/PluginUninstallDialog.py Thu Sep 05 18:15:10 2013 +0200 +++ b/PluginManager/PluginUninstallDialog.py Thu Sep 05 18:31:35 2013 +0200 @@ -97,7 +97,7 @@ pluginFile = self.pluginNameCombo\ .itemData(self.pluginNameCombo.currentIndex()) - if not self.__pluginManager.unloadPlugin(pluginName, pluginDirectory): + if not self.__pluginManager.unloadPlugin(pluginName): E5MessageBox.critical(self, self.trUtf8("Plugin Uninstallation"), self.trUtf8("""<p>The plugin <b>{0}</b> could not be unloaded."""