diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-06 23:16:34 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-07 13:58:13 +0200 |
commit | 41a7a262591e25985431a70e8b597ce85d10ebd6 (patch) | |
tree | 1ee6f34ee5319ac666ffeaae97613296bdd1e693 /examples | |
parent | a5614dc469aada7c3b2b294a318defb40a50205b (diff) | |
download | NetworkManager-41a7a262591e25985431a70e8b597ce85d10ebd6.tar.gz |
examples: remove unused imports from python examples
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/python/dbus/get-active-connection-uuids.py | 2 | ||||
-rwxr-xr-x | examples/python/dbus/list-devices.py | 2 | ||||
-rwxr-xr-x | examples/python/dbus/wifi-active-ap.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/checkpoint.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/dns.py | 1 | ||||
-rwxr-xr-x | examples/python/gi/get-active-connections.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/get-devices.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/get-interface-flags.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/get_ips.py | 2 | ||||
-rwxr-xr-x | examples/python/gi/nm-add-connection2.py | 1 | ||||
-rwxr-xr-x | examples/python/gi/nm-update2.py | 1 | ||||
-rwxr-xr-x | examples/python/gi/nm-wg-set | 1 |
12 files changed, 7 insertions, 13 deletions
diff --git a/examples/python/dbus/get-active-connection-uuids.py b/examples/python/dbus/get-active-connection-uuids.py index 8d0e5c15e7..dd168c0aab 100755 --- a/examples/python/dbus/get-active-connection-uuids.py +++ b/examples/python/dbus/get-active-connection-uuids.py @@ -4,7 +4,7 @@ # Copyright (C) 2010 Red Hat, Inc. # -import dbus, sys +import dbus # This example takes a device interface name as a parameter and tells # NetworkManager to disconnect that device, closing down any network diff --git a/examples/python/dbus/list-devices.py b/examples/python/dbus/list-devices.py index 4a9ebe4e53..aebc902bbe 100755 --- a/examples/python/dbus/list-devices.py +++ b/examples/python/dbus/list-devices.py @@ -4,7 +4,7 @@ # Copyright (C) 2011 - 2012 Red Hat, Inc. # -import dbus, sys +import dbus # This example lists basic information about network interfaces known to NM diff --git a/examples/python/dbus/wifi-active-ap.py b/examples/python/dbus/wifi-active-ap.py index 790f11a9ef..b81c06a933 100755 --- a/examples/python/dbus/wifi-active-ap.py +++ b/examples/python/dbus/wifi-active-ap.py @@ -11,7 +11,7 @@ # 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" diff --git a/examples/python/gi/checkpoint.py b/examples/python/gi/checkpoint.py index b3b4e0f8a5..b1ecbb8984 100755 --- a/examples/python/gi/checkpoint.py +++ b/examples/python/gi/checkpoint.py @@ -10,8 +10,6 @@ import gi gi.require_version('NM', '1.0') from gi.repository import GLib, NM -import os - ############################################################################### def usage(): diff --git a/examples/python/gi/dns.py b/examples/python/gi/dns.py index f93f97e514..da2a6a6c43 100755 --- a/examples/python/gi/dns.py +++ b/examples/python/gi/dns.py @@ -4,7 +4,6 @@ # Copyright (C) 2016 Red Hat, Inc. # -import sys import gi gi.require_version('NM', '1.0') from gi.repository import GLib, NM diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py index 072f245ab0..6da8b61890 100755 --- a/examples/python/gi/get-active-connections.py +++ b/examples/python/gi/get-active-connections.py @@ -8,7 +8,7 @@ import gi gi.require_version('NM', '1.0') -from gi.repository import GLib, NM +from gi.repository import NM if __name__ == "__main__": client = NM.Client.new(None) diff --git a/examples/python/gi/get-devices.py b/examples/python/gi/get-devices.py index 113d384b30..88bcc8945b 100755 --- a/examples/python/gi/get-devices.py +++ b/examples/python/gi/get-devices.py @@ -8,7 +8,7 @@ import gi gi.require_version('NM', '1.0') -from gi.repository import GLib, NM +from gi.repository import NM if __name__ == "__main__": client = NM.Client.new(None) diff --git a/examples/python/gi/get-interface-flags.py b/examples/python/gi/get-interface-flags.py index 756999169b..e1d1721a4f 100755 --- a/examples/python/gi/get-interface-flags.py +++ b/examples/python/gi/get-interface-flags.py @@ -6,7 +6,7 @@ import gi gi.require_version('NM', '1.0') -from gi.repository import GLib, NM +from gi.repository import NM if __name__ == "__main__": client = NM.Client.new(None) diff --git a/examples/python/gi/get_ips.py b/examples/python/gi/get_ips.py index 13b0a8b6db..75be2f8c5d 100755 --- a/examples/python/gi/get_ips.py +++ b/examples/python/gi/get_ips.py @@ -7,7 +7,7 @@ import sys, socket import gi gi.require_version('NM', '1.0') -from gi.repository import GLib, NM +from gi.repository import NM # # This example shows how to get addresses, routes and DNS information diff --git a/examples/python/gi/nm-add-connection2.py b/examples/python/gi/nm-add-connection2.py index 01c1ae7bd9..c5ec3f3bbe 100755 --- a/examples/python/gi/nm-add-connection2.py +++ b/examples/python/gi/nm-add-connection2.py @@ -5,7 +5,6 @@ # import sys -import re import gi gi.require_version('NM', '1.0') diff --git a/examples/python/gi/nm-update2.py b/examples/python/gi/nm-update2.py index 5a65879371..23e277c78d 100755 --- a/examples/python/gi/nm-update2.py +++ b/examples/python/gi/nm-update2.py @@ -5,7 +5,6 @@ # import sys -import re import gi gi.require_version('NM', '1.0') diff --git a/examples/python/gi/nm-wg-set b/examples/python/gi/nm-wg-set index ca31ac7207..81d86c7c0a 100755 --- a/examples/python/gi/nm-wg-set +++ b/examples/python/gi/nm-wg-set @@ -58,7 +58,6 @@ # nm-wg-set id "$PROFILE" $WG_ARGS import sys -import re import os import gi |