From 48ab9d7522bd2b1430655c86543d30ddc32124ce Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Tue, 29 Jul 2008 05:47:49 +0000 Subject: [PATCH] Fix shutdown() to accept any number of arguments --- deluge/ui/gtkui/gtkui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 1cc906670..0292208b6 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -227,7 +227,7 @@ class GtkUI: else: self.shutdown() - def shutdown(self, data=None): + def shutdown(self, *args, **kwargs): log.debug("gtkui shutting down..") # Make sure the config is saved. @@ -240,7 +240,10 @@ class GtkUI: client.shutdown() except: pass - + try: + gtk.main_quit() + except RuntimeError: + pass def _on_new_core(self, data): component.start()