(self, pId)
| 447 | return False |
| 448 | |
| 449 | def removePlugin(self, pId): |
| 450 | plugin = self.getPlugin(pId) |
| 451 | |
| 452 | if plugin: |
| 453 | #Tell the plugin |
| 454 | plugin.onRemove() |
| 455 | |
| 456 | #remove from the internal structure |
| 457 | del self._plugins[pId] |
| 458 | |
| 459 | #remove the files from its directory |
| 460 | userPluginsDir = settings().getBaseFolder('userPlugins') |
| 461 | shutil.rmtree( os.path.join(userPluginsDir, pId.replace('.','_')) ) |
| 462 | |
| 463 | #Tell all the listeners to the manager's [ON_PLUGIN_REMOVED] event |
| 464 | self._fireEvent('ON_PLUGIN_REMOVED', [plugin]) |
| 465 | |
| 466 | self._logger.info("Removed --> %s, version: %s" % (plugin.pluginId, plugin.version)) |
| 467 | |
| 468 | return {'removed': pId, 'providers': plugin.providers} |
| 469 | |
| 470 | else: |
| 471 | return {'error': 'not_found'} |
| 472 | |
| 473 | def loadPlugins(self): |
| 474 | userPluginsDir = settings().getBaseFolder('userPlugins') |
no test coverage detected