examples: use GLib.MainLoop instead of deprecated GObject.MainLoop in python

jklimes:
made the change for new firewall-zone.py example as well.
This commit is contained in:
Jiri Popelka
2013-09-24 12:58:01 +02:00
committed by Jiří Klimeš
parent 8a04ab9135
commit a20fd994f4
3 changed files with 6 additions and 6 deletions

View File

@@ -20,7 +20,7 @@
#
import sys
from gi.repository import GObject, NetworkManager, NMClient
from gi.repository import GLib, NetworkManager, NMClient
#
# This example demonstrates how to get and change firewall zone in a
@@ -77,7 +77,7 @@ if __name__ == "__main__":
if len(sys.argv) != 2 and len(sys.argv) != 3:
sys.exit('Usage: %s <connection name or UUID> [new zone]' % sys.argv[0])
main_loop = GObject.MainLoop()
main_loop = GLib.MainLoop()
settings = NMClient.RemoteSettings.new(None);
# Connections are read asynchronously, so we have to wait for the