diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2014-08-09 00:10:20 +0100 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2014-08-09 00:16:48 +0100 |
commit | e2b0ceae1d1f65c6c9884faccd4c65c02e4643bb (patch) | |
tree | 7b4856869855e43c8932ecb5d0bd9ba5d996a436 | |
parent | 5dba83853308482827aaecd1be1e79be97e30d15 (diff) | |
download | deluge-e2b0ceae1d1f65c6c9884faccd4c65c02e4643bb.tar.gz deluge-e2b0ceae1d1f65c6c9884faccd4c65c02e4643bb.tar.bz2 deluge-e2b0ceae1d1f65c6c9884faccd4c65c02e4643bb.zip |
[GTKUI] Suppress unimportant gnome warnings
-rw-r--r-- | deluge/ui/gtkui/gtkui.py | 11 |
1 files changed, 10 insertions, 1 deletions
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() |