mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-29 20:56:31 +00:00
[GTKUI] Suppress unimportant gnome warnings
This commit is contained in:
parent
9ba07d3883
commit
670cd21685
@ -44,6 +44,7 @@ import os
|
||||
import gtk
|
||||
import sys
|
||||
import logging
|
||||
import warnings
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -165,7 +166,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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user