about summary refs log tree commit diff
path: root/examples/python/gi/get-active-connections.py
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-07-02 12:20:27 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-07-02 12:20:27 +0200
commit486e0bef719d78ee55d2166b0bfb4fa684c09854 (patch)
treeaead4c1cc30eb61a2d9dec70f7c8339904506fad /examples/python/gi/get-active-connections.py
parent39143df7aed46e83f8c68ea9ad6d24cfdf5a1dd8 (diff)
parent10ae7d8cd706062742d0cdb1803d49909aef9e06 (diff)
Merge branch 'upstream/latest' of https://salsa.debian.org/utopia-team/network-manager into upstream/latest
Diffstat (limited to 'examples/python/gi/get-active-connections.py')
-rwxr-xr-xexamples/python/gi/get-active-connections.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py
index 072f245a..c2f261ab 100755
--- a/examples/python/gi/get-active-connections.py
+++ b/examples/python/gi/get-active-connections.py
@@ -7,8 +7,9 @@
 # This example lists currently active connections
 
 import gi
-gi.require_version('NM', '1.0')
-from gi.repository import GLib, NM
+
+gi.require_version("NM", "1.0")
+from gi.repository import NM
 
 if __name__ == "__main__":
     client = NM.Client.new(None)
@@ -16,6 +17,4 @@ if __name__ == "__main__":
     for ac in acons:
         print("%s (%s) - %s" % (ac.get_id(), ac.get_uuid(), ac.get_connection_type()))
     if len(acons) == 0:
-       print("No active connections")
-
-
+        print("No active connections")