mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-19 08:08:33 +00:00
[GTKUI] Suppress unimportant gnome warnings
This commit is contained in:
parent
5dba838533
commit
e2b0ceae1d
1 changed files with 10 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue