Only attempt stopping PluginManagers looping call if it's running.

This commit is contained in:
Andrew Resch 2009-02-03 06:39:33 +00:00
parent a24738a9ff
commit e0735cf5ca
2 changed files with 4 additions and 2 deletions

View File

@ -172,7 +172,8 @@ class ComponentRegistry:
try:
self.components[component].shutdown()
except Exception, e:
log.debug("Unable to call shutdown(): %s", e)
log.debug("Unable to call shutdown()")
log.exception(e)
_ComponentRegistry = ComponentRegistry()

View File

@ -65,7 +65,8 @@ class PluginManager(deluge.pluginmanagerbase.PluginManagerBase,
# Disable all enabled plugins
self.disable_plugins()
# Stop the update timer
self.update_timer.stop()
if self.update_timer.running:
self.update_timer.stop()
def shutdown(self):
self.stop()