about summary refs log tree commit diff
path: root/examples/python/dbus/wifi-active-ap.py
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2020-06-28 18:59:08 +0200
committerMichael Biebl <biebl@debian.org>2020-06-28 18:59:08 +0200
commit215112eefc83274273a10d9ddb5e107c9beec548 (patch)
treea16052cef4bb8707d6a906dd784a50c75945d03e /examples/python/dbus/wifi-active-ap.py
parent5ed4e66e01b005212aee22c255c9c6b2a4b040a9 (diff)
parenta54ac63bbf9b2c71026ac9028a8ffaf186cf3c82 (diff)
Update upstream source from tag 'upstream/1.25.90'
Update to upstream version '1.25.90'
with Debian dir 16d4caa71e8ba8c27ee163c88f11456b6cdc0490
Diffstat (limited to 'examples/python/dbus/wifi-active-ap.py')
-rwxr-xr-xexamples/python/dbus/wifi-active-ap.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/python/dbus/wifi-active-ap.py b/examples/python/dbus/wifi-active-ap.py
index 78673e76..33fae0b2 100755
--- a/examples/python/dbus/wifi-active-ap.py
+++ b/examples/python/dbus/wifi-active-ap.py
@@ -5,13 +5,13 @@
 #
 
 #
-# This example starts or stops a wifi hotspot
+# This example prints the current wifi access point
 #
 # Configuration settings are described at
 # https://developer.gnome.org/NetworkManager/1.0/ref-settings.html
 #
 
-import dbus, sys, time
+import dbus, sys
 
 bus = dbus.SystemBus()
 service_name = "org.freedesktop.NetworkManager"
@@ -31,7 +31,9 @@ devpath = nm.GetDeviceByIpIface(iface)
 # Get a proxy to the wifi device and get the active access point's object path
 proxy = bus.get_object(service_name, devpath)
 props = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
-active_ap_path = props.Get("org.freedesktop.NetworkManager.Device.Wireless", "ActiveAccessPoint")
+active_ap_path = props.Get(
+    "org.freedesktop.NetworkManager.Device.Wireless", "ActiveAccessPoint"
+)
 if active_ap_path == "/":
     print("%s is not currently associated" % sys.argv[1])
     sys.exit(0)
@@ -50,4 +52,3 @@ for c in raw_ssid:
 print("%s is associated to '%s' (%s)" % (sys.argv[1], ssid, bssid))
 
 sys.exit(0)
-