From a54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sun, 28 Jun 2020 18:58:14 +0200 Subject: New upstream version 1.25.90 --- examples/python/gi/firewall-zone.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'examples/python/gi/firewall-zone.py') diff --git a/examples/python/gi/firewall-zone.py b/examples/python/gi/firewall-zone.py index 6cbd8c25..3de06f52 100755 --- a/examples/python/gi/firewall-zone.py +++ b/examples/python/gi/firewall-zone.py @@ -6,7 +6,8 @@ import sys import gi -gi.require_version('NM', '1.0') + +gi.require_version("NM", "1.0") from gi.repository import GLib, NM # @@ -26,13 +27,15 @@ from gi.repository import GLib, NM main_loop = None + def connection_saved(connection, error, data): - print ("Connection '%s' saved.") % (connection.get_id()) + print("Connection '%s' saved.") % (connection.get_id()) main_loop.quit() + if __name__ == "__main__": if len(sys.argv) != 2 and len(sys.argv) != 3: - sys.exit('Usage: %s [new zone]' % sys.argv[0]) + sys.exit("Usage: %s [new zone]" % sys.argv[0]) main_loop = GLib.MainLoop() client = NM.Client.new(None) -- cgit 1.3.0-6-gf8a5