aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-02-09 19:20:41 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-02-09 19:32:07 +0100
commitd09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6 (patch)
treef46bcb708ecf4d369e4849a6b77263a2bae7ab9c
parentaac33582eaeb78ad7e8c99b7d6dcf41c9b85180b (diff)
downloadmsec-d09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6.tar
msec-d09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6.tar.gz
msec-d09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6.tar.bz2
msec-d09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6.tar.xz
msec-d09d4b33ba7eeaa9470e4e50298b07fd0ae3bbb6.zip
fix "PyGIDeprecationWarning: timeout_add is deprecated"
-rwxr-xr-xsrc/msec/msecgui.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/msec/msecgui.py b/src/msec/msecgui.py
index 7451618..c2980d0 100755
--- a/src/msec/msecgui.py
+++ b/src/msec/msecgui.py
@@ -18,6 +18,7 @@ import time
import warnings
warnings.filterwarnings('error', module='gtk')
try:
+ from gi.repository import GLib
from gi.repository import GdkPixbuf
from gi.repository import Gtk
import gi
@@ -268,7 +269,7 @@ class MsecGui:
# pending signals
self.signals = Queue.Queue()
- GObject.timeout_add(500, self.check_signals)
+ GLib.timeout_add(500, self.check_signals)
self.window.show_all()
@@ -285,7 +286,7 @@ class MsecGui:
s = self.signals.get()
if s == signal.SIGTERM:
self.quit(self.window)
- GObject.timeout_add(500, self.check_signals)
+ GLib.timeout_add(500, self.check_signals)
def check_for_changes(self, curconfig, curperms):
"""Checks for changes in configuration. Returns number of configuration