Author: andar
Revision: 5294
Log:
Handle shutdown() better
Diff:
Modified: trunk/deluge/core/daemon.py
===================================================================
--- trunk/deluge/core/daemon.py 2009-05-20 18:51:37 UTC (rev 5293)
+++ trunk/deluge/core/daemon.py 2009-05-20 20:11:57 UTC (rev 5294)
@@ -156,11 +156,14 @@
component.start()
try:
reactor.run()
- except KeyboardInterrupt:
- self.shutdown()
+ finally:
+ self._shutdown()
@export()
def shutdown(self, *args, **kwargs):
+ reactor.callLater(0, reactor.stop)
+
+ def _shutdown(self, *args, **kwargs):
try:
os.remove(deluge.configmanager.get_config_dir("deluged.pid"))
except Exception, e:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---