From e2b0ceae1d1f65c6c9884faccd4c65c02e4643bb Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 9 Aug 2014 00:10:20 +0100 Subject: [GTKUI] Suppress unimportant gnome warnings --- deluge/ui/gtkui/gtkui.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index bbe11955c..30755b160 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -46,6 +46,7 @@ import locale import pkg_resources import gtk, gtk.glade import sys +import warnings try: from setproctitle import setproctitle, getproctitle @@ -177,7 +178,15 @@ class GtkUI(object): try: import gnome.ui import gnome - self.gnome_prog = gnome.init("Deluge", deluge.common.get_version()) + + #Suppress: Warning: Attempt to add property GnomeProgram::*** after class was initialised + original_filters = warnings.filters[:] + warnings.simplefilter("ignore") + try: + self.gnome_prog = gnome.init("Deluge", deluge.common.get_version()) + finally: + warnings.filters = original_filters + self.gnome_client = gnome.ui.master_client() def on_die(*args): reactor.stop() -- cgit