diff options
| author | Michael Biebl <biebl@debian.org> | 2021-02-11 18:11:46 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2021-02-11 18:11:46 +0100 |
| commit | 80ec1decc49c72efec2a8b87c06245c92c0ab807 (patch) | |
| tree | e3b229aa94e8dcf0590f2317664176e7b8f7607b /examples/python/dbus | |
| parent | 65f86e8f56267192d42f2b629fc6b0c99fb9cd0c (diff) | |
New upstream version 1.29.90 upstream/1.29.90
Diffstat (limited to 'examples/python/dbus')
| -rwxr-xr-x | examples/python/dbus/add-connection-compat.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/add-connection.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/add-wifi-eap-connection.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/add-wifi-psk-connection.py | 6 | ||||
| -rwxr-xr-x | examples/python/dbus/create-bond.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/disconnect-device.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/get-active-connection-uuids.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/is-wwan-default.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/list-connections.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/list-devices.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/nm-state.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/show-bssids.py | 9 | ||||
| -rwxr-xr-x | examples/python/dbus/update-ip4-method.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/update-secrets.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/vpn.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/wifi-active-ap.py | 2 | ||||
| -rwxr-xr-x | examples/python/dbus/wifi-hotspot.py | 2 |
17 files changed, 25 insertions, 20 deletions
diff --git a/examples/python/dbus/add-connection-compat.py b/examples/python/dbus/add-connection-compat.py index 2661eccb..d5218514 100755 --- a/examples/python/dbus/add-connection-compat.py +++ b/examples/python/dbus/add-connection-compat.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/add-connection.py b/examples/python/dbus/add-connection.py index a7c8947c..cfb46de2 100755 --- a/examples/python/dbus/add-connection.py +++ b/examples/python/dbus/add-connection.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/add-wifi-eap-connection.py b/examples/python/dbus/add-wifi-eap-connection.py index 23962e76..8ed80f72 100755 --- a/examples/python/dbus/add-wifi-eap-connection.py +++ b/examples/python/dbus/add-wifi-eap-connection.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2011 Red Hat, Inc. # diff --git a/examples/python/dbus/add-wifi-psk-connection.py b/examples/python/dbus/add-wifi-psk-connection.py index 66d42e82..c9a4ceed 100755 --- a/examples/python/dbus/add-wifi-psk-connection.py +++ b/examples/python/dbus/add-wifi-psk-connection.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2015 Red Hat, Inc. # @@ -11,11 +11,11 @@ s_con = dbus.Dictionary( ) s_wifi = dbus.Dictionary( - {"ssid": dbus.ByteArray("best-wifi".encode("utf-8")), "mode": "infrastructure",} + {"ssid": dbus.ByteArray("best-wifi".encode("utf-8")), "mode": "infrastructure"} ) s_wsec = dbus.Dictionary( - {"key-mgmt": "wpa-psk", "auth-alg": "open", "psk": "super-secret-password",} + {"key-mgmt": "wpa-psk", "auth-alg": "open", "psk": "super-secret-password"} ) s_ip4 = dbus.Dictionary({"method": "auto"}) diff --git a/examples/python/dbus/create-bond.py b/examples/python/dbus/create-bond.py index 77c2ece4..4ebec24a 100755 --- a/examples/python/dbus/create-bond.py +++ b/examples/python/dbus/create-bond.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2015 Red Hat, Inc. # diff --git a/examples/python/dbus/disconnect-device.py b/examples/python/dbus/disconnect-device.py index 1b257025..d44eb1bd 100755 --- a/examples/python/dbus/disconnect-device.py +++ b/examples/python/dbus/disconnect-device.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 Red Hat, Inc. # diff --git a/examples/python/dbus/get-active-connection-uuids.py b/examples/python/dbus/get-active-connection-uuids.py index 3e80b603..1ba156b6 100755 --- a/examples/python/dbus/get-active-connection-uuids.py +++ b/examples/python/dbus/get-active-connection-uuids.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 Red Hat, Inc. # diff --git a/examples/python/dbus/is-wwan-default.py b/examples/python/dbus/is-wwan-default.py index 18279db0..749b71b3 100755 --- a/examples/python/dbus/is-wwan-default.py +++ b/examples/python/dbus/is-wwan-default.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2011 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/list-connections.py b/examples/python/dbus/list-connections.py index 81b32896..c5381b69 100755 --- a/examples/python/dbus/list-connections.py +++ b/examples/python/dbus/list-connections.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 - 2011 Red Hat, Inc. # diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py index 910bc461..17654f38 100755 --- a/examples/python/dbus/list-devices.py +++ b/examples/python/dbus/list-devices.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2011 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/nm-state.py b/examples/python/dbus/nm-state.py index 4bc9285e..27e99e27 100755 --- a/examples/python/dbus/nm-state.py +++ b/examples/python/dbus/nm-state.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/show-bssids.py b/examples/python/dbus/show-bssids.py index b56822fb..17364e49 100755 --- a/examples/python/dbus/show-bssids.py +++ b/examples/python/dbus/show-bssids.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 Red Hat, Inc. # @@ -7,6 +7,11 @@ # This example prints out all the AP BSSIDs that all Wi-Fi devices on the # machine can see. Useful for location-based services like Skyhook that # can geolocate you based on the APs you can see. +# +# Note that with NetworkManager clients are required to request scanning. +# If you don't do that, the scan list may be outdated. That means, you would +# check the LastScan property, and if necessary call RequestScan() first. +# After RequestScan(), you wait until the LastScan property gets bumped again. import dbus @@ -30,7 +35,7 @@ for d in devices: # Make sure the device is enabled before we try to use it state = prop_iface.Get("org.freedesktop.NetworkManager.Device", "State") - if state <= 2: + if state <= 20: # NM_DEVICE_STATE_UNAVAILABLE continue # Get device's type; we only want wifi devices diff --git a/examples/python/dbus/update-ip4-method.py b/examples/python/dbus/update-ip4-method.py index 98927903..d84e01b2 100755 --- a/examples/python/dbus/update-ip4-method.py +++ b/examples/python/dbus/update-ip4-method.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2014 Red Hat, Inc. # diff --git a/examples/python/dbus/update-secrets.py b/examples/python/dbus/update-secrets.py index 5df25e5c..ce69cb9a 100755 --- a/examples/python/dbus/update-secrets.py +++ b/examples/python/dbus/update-secrets.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2011 - 2012 Red Hat, Inc. # diff --git a/examples/python/dbus/vpn.py b/examples/python/dbus/vpn.py index 814e4415..f86bf1ad 100755 --- a/examples/python/dbus/vpn.py +++ b/examples/python/dbus/vpn.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2009 Novell, Inc. # Copyright (C) 2009 Red Hat, Inc. diff --git a/examples/python/dbus/wifi-active-ap.py b/examples/python/dbus/wifi-active-ap.py index 33fae0b2..bc8f1ea5 100755 --- a/examples/python/dbus/wifi-active-ap.py +++ b/examples/python/dbus/wifi-active-ap.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2015 Red Hat, Inc. # diff --git a/examples/python/dbus/wifi-hotspot.py b/examples/python/dbus/wifi-hotspot.py index 77582b6a..a441e7e9 100755 --- a/examples/python/dbus/wifi-hotspot.py +++ b/examples/python/dbus/wifi-hotspot.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# SPDX-License-Identifier: GPL-2.0+ +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2010 - 2012 Red Hat, Inc. # |