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

@@ -18,7 +18,7 @@
# Copyright (C) 2012 Red Hat, Inc.
#
from gi.repository import GObject, NetworkManager, NMClient
from gi.repository import GLib, NetworkManager, NMClient
# This example asks settings service for all configured connections.
# Unfortunately, at this time since libnm-glib still makes heavy use of
@@ -40,7 +40,7 @@ def connections_read(settings):
main_loop.quit()
if __name__ == "__main__":
main_loop = GObject.MainLoop()
main_loop = GLib.MainLoop()
settings = NMClient.RemoteSettings.new(None);
# connections are read asynchronously, so we need to wait for the