From 699b83cb1fd52739b0c8ce0d70112fcb53bf1a17 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Fri, 14 Dec 2018 11:15:26 -0800 Subject: [PATCH] auto-t: removed ';' from many autotests At some point a stray ';' got added into an autotest in a section of code that is heavily copy pasted. So in turn nearly all the autotests have this stray ';' after list_devices (and a few in other places). --- autotests/testAPRoam/connection_test.py | 2 +- autotests/testConnectAutoconnect/validation.py | 2 +- autotests/testDisconnectByAP/disconnect_by_ap_test.py | 2 +- autotests/testEAP-AKA-ofono/connection_test.py | 2 +- autotests/testEAP-AKA-prime-ofono/connection_test.py | 2 +- autotests/testEAP-AKA-prime/connection_test.py | 2 +- autotests/testEAP-AKA/connection_test.py | 2 +- autotests/testEAP-MSCHAPV2/connection_test.py | 2 +- autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py | 2 +- autotests/testEAP-PEAP-GTC/peap_gtc_test.py | 2 +- autotests/testEAP-PEAP-SIM/connection_test.py | 2 +- autotests/testEAP-PEAP/peap_frag_test.py | 2 +- autotests/testEAP-PEAP/peap_v0_test.py | 2 +- autotests/testEAP-PEAP/peap_v1_test.py | 2 +- autotests/testEAP-PWD/connection_test.py | 2 +- autotests/testEAP-PWD/frag_test.py | 2 +- autotests/testEAP-SIM-ofono/connection_test.py | 2 +- autotests/testEAP-SIM/connection_test.py | 2 +- autotests/testEAP-TLS-Frag/connection_test.py | 2 +- autotests/testEAP-TLS/connection_test.py | 2 +- autotests/testEAP-TLSwithMFPC/connection_test.py | 2 +- autotests/testEAP-TLSwithMFPR/connection_test.py | 2 +- autotests/testEAP-TTLS-CHAP/connection_test.py | 2 +- autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py | 2 +- autotests/testEAP-TTLS-Frag/connection_test.py | 2 +- autotests/testEAP-TTLS-MSCHAP/connection_test.py | 2 +- autotests/testEAP-TTLS-PAP/connection_test.py | 2 +- autotests/testEAP-TTLS/connection_test.py | 2 +- autotests/testEAP-WPS-Frag/wps_frag_test.py | 2 +- autotests/testEAP-WPS/wps_test.py | 6 +++--- autotests/testFT-8021x-roam/test.py | 4 ++-- autotests/testFT-PSK-roam/test.py | 4 ++-- autotests/testHiddenNetworks/validation.py | 2 +- autotests/testKnownNetworks/known_network_test.py | 2 +- autotests/testMFP-Options/connection_test.py | 2 +- autotests/testOpen/connection_test.py | 2 +- autotests/testPreauth-roam/test.py | 2 +- autotests/testRSSIAgent/test.py | 2 +- autotests/testSAQuery-spoofing/connection_test.py | 2 +- autotests/testSAQuery/connection_test.py | 2 +- autotests/testScan/periodic_scan_test.py | 4 ++-- autotests/testScan/requested_scan_test.py | 4 ++-- autotests/testWPA/connection_test.py | 2 +- autotests/testWPA2-SHA256/connection_test.py | 2 +- autotests/testWPA2/connection_test.py | 2 +- autotests/testWPA2/failure_test.py | 2 +- autotests/testWPA2/password_test.py | 2 +- autotests/testWPA2withMFP/connection_test.py | 2 +- autotests/util/hostapd.py | 4 ++-- autotests/util/hwsim.py | 2 +- autotests/util/iwd.py | 4 ++-- 51 files changed, 59 insertions(+), 59 deletions(-) diff --git a/autotests/testAPRoam/connection_test.py b/autotests/testAPRoam/connection_test.py index 7af6749a..8e832528 100644 --- a/autotests/testAPRoam/connection_test.py +++ b/autotests/testAPRoam/connection_test.py @@ -48,7 +48,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testConnectAutoconnect/validation.py b/autotests/testConnectAutoconnect/validation.py index 0c959a46..7884d255 100644 --- a/autotests/testConnectAutoconnect/validation.py +++ b/autotests/testConnectAutoconnect/validation.py @@ -60,7 +60,7 @@ class TestConnectAutoconnect(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testDisconnectByAP/disconnect_by_ap_test.py b/autotests/testDisconnectByAP/disconnect_by_ap_test.py index fb0987a8..9df11f7c 100644 --- a/autotests/testDisconnectByAP/disconnect_by_ap_test.py +++ b/autotests/testDisconnectByAP/disconnect_by_ap_test.py @@ -17,7 +17,7 @@ class Test(unittest.TestCase): def test_disconnect(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] hostapd_if = list(hostapd_map.values())[0] diff --git a/autotests/testEAP-AKA-ofono/connection_test.py b/autotests/testEAP-AKA-ofono/connection_test.py index 43bf8c2b..fd9aeec2 100644 --- a/autotests/testEAP-AKA-ofono/connection_test.py +++ b/autotests/testEAP-AKA-ofono/connection_test.py @@ -21,7 +21,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-AKA-prime-ofono/connection_test.py b/autotests/testEAP-AKA-prime-ofono/connection_test.py index 7c177dda..022f1a4b 100644 --- a/autotests/testEAP-AKA-prime-ofono/connection_test.py +++ b/autotests/testEAP-AKA-prime-ofono/connection_test.py @@ -21,7 +21,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-AKA-prime/connection_test.py b/autotests/testEAP-AKA-prime/connection_test.py index fb237544..b5ce22fc 100644 --- a/autotests/testEAP-AKA-prime/connection_test.py +++ b/autotests/testEAP-AKA-prime/connection_test.py @@ -16,7 +16,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-AKA/connection_test.py b/autotests/testEAP-AKA/connection_test.py index 0d429f48..a1dc613e 100644 --- a/autotests/testEAP-AKA/connection_test.py +++ b/autotests/testEAP-AKA/connection_test.py @@ -29,7 +29,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-MSCHAPV2/connection_test.py b/autotests/testEAP-MSCHAPV2/connection_test.py index e5ea4869..1e826eeb 100644 --- a/autotests/testEAP-MSCHAPV2/connection_test.py +++ b/autotests/testEAP-MSCHAPV2/connection_test.py @@ -16,7 +16,7 @@ class Test(unittest.TestCase): psk_agent = iwd.PSKAgent(*secrets) wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] try: diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py index f9ed5a42..de38d1fb 100644 --- a/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py +++ b/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py @@ -13,7 +13,7 @@ from iwd import PSKAgent class Test(unittest.TestCase): def validate_connection(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py index fe8ace43..54b9f179 100644 --- a/autotests/testEAP-PEAP-GTC/peap_gtc_test.py +++ b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py @@ -12,7 +12,7 @@ from iwd import NetworkType class Test(unittest.TestCase): def validate_connection(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PEAP-SIM/connection_test.py b/autotests/testEAP-PEAP-SIM/connection_test.py index f8e7353a..97e94a8c 100644 --- a/autotests/testEAP-PEAP-SIM/connection_test.py +++ b/autotests/testEAP-PEAP-SIM/connection_test.py @@ -12,7 +12,7 @@ from hlrauc import AuthCenter class Test(unittest.TestCase): def validate_connection(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PEAP/peap_frag_test.py b/autotests/testEAP-PEAP/peap_frag_test.py index 268c3881..fa007db3 100644 --- a/autotests/testEAP-PEAP/peap_frag_test.py +++ b/autotests/testEAP-PEAP/peap_frag_test.py @@ -14,7 +14,7 @@ class Test(unittest.TestCase): def validate_connection(self, wd): ssid_to_connect = 'ssidEAP-PEAP-frag' - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PEAP/peap_v0_test.py b/autotests/testEAP-PEAP/peap_v0_test.py index 9a50cfa9..0d539ec4 100644 --- a/autotests/testEAP-PEAP/peap_v0_test.py +++ b/autotests/testEAP-PEAP/peap_v0_test.py @@ -14,7 +14,7 @@ class Test(unittest.TestCase): def validate_connection(self, wd): ssid_to_connect = 'ssidEAP-PEAPv0' - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PEAP/peap_v1_test.py b/autotests/testEAP-PEAP/peap_v1_test.py index 22794c7c..bab0661d 100644 --- a/autotests/testEAP-PEAP/peap_v1_test.py +++ b/autotests/testEAP-PEAP/peap_v1_test.py @@ -14,7 +14,7 @@ class Test(unittest.TestCase): def validate_connection(self, wd): ssid_to_connect = 'ssidEAP-PEAPv1' - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PWD/connection_test.py b/autotests/testEAP-PWD/connection_test.py index 07c0abcc..44a9cd27 100644 --- a/autotests/testEAP-PWD/connection_test.py +++ b/autotests/testEAP-PWD/connection_test.py @@ -30,7 +30,7 @@ class Test(unittest.TestCase): 'secret123')) wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-PWD/frag_test.py b/autotests/testEAP-PWD/frag_test.py index e0e44c98..ddccac89 100644 --- a/autotests/testEAP-PWD/frag_test.py +++ b/autotests/testEAP-PWD/frag_test.py @@ -11,7 +11,7 @@ from iwd import NetworkType class Test(unittest.TestCase): def validate_connection(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testEAP-SIM-ofono/connection_test.py b/autotests/testEAP-SIM-ofono/connection_test.py index f86f8dc5..5cc39b6b 100644 --- a/autotests/testEAP-SIM-ofono/connection_test.py +++ b/autotests/testEAP-SIM-ofono/connection_test.py @@ -21,7 +21,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-SIM/connection_test.py b/autotests/testEAP-SIM/connection_test.py index f1f2833f..8274abc0 100644 --- a/autotests/testEAP-SIM/connection_test.py +++ b/autotests/testEAP-SIM/connection_test.py @@ -27,7 +27,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TLS-Frag/connection_test.py b/autotests/testEAP-TLS-Frag/connection_test.py index 0d2d5aa6..124eb339 100644 --- a/autotests/testEAP-TLS-Frag/connection_test.py +++ b/autotests/testEAP-TLS-Frag/connection_test.py @@ -13,7 +13,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TLS/connection_test.py b/autotests/testEAP-TLS/connection_test.py index b809ff96..cfcfdc64 100644 --- a/autotests/testEAP-TLS/connection_test.py +++ b/autotests/testEAP-TLS/connection_test.py @@ -26,7 +26,7 @@ class Test(unittest.TestCase): hostapd_ifname = ifname break - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TLSwithMFPC/connection_test.py b/autotests/testEAP-TLSwithMFPC/connection_test.py index 0d2d5aa6..124eb339 100644 --- a/autotests/testEAP-TLSwithMFPC/connection_test.py +++ b/autotests/testEAP-TLSwithMFPC/connection_test.py @@ -13,7 +13,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TLSwithMFPR/connection_test.py b/autotests/testEAP-TLSwithMFPR/connection_test.py index 0d2d5aa6..124eb339 100644 --- a/autotests/testEAP-TLSwithMFPR/connection_test.py +++ b/autotests/testEAP-TLSwithMFPR/connection_test.py @@ -13,7 +13,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TTLS-CHAP/connection_test.py b/autotests/testEAP-TTLS-CHAP/connection_test.py index 0e5c6281..60e8d69e 100644 --- a/autotests/testEAP-TTLS-CHAP/connection_test.py +++ b/autotests/testEAP-TTLS-CHAP/connection_test.py @@ -31,7 +31,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent('abc', ('user', 'testpasswd')) wd.register_psk_agent(psk_agent) - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition) diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py b/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py index e8d09587..d39862f4 100644 --- a/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py +++ b/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py @@ -18,7 +18,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent('abc', ('user', 'testpasswd')) wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TTLS-Frag/connection_test.py b/autotests/testEAP-TTLS-Frag/connection_test.py index 24ed3901..e9b53a48 100644 --- a/autotests/testEAP-TTLS-Frag/connection_test.py +++ b/autotests/testEAP-TTLS-Frag/connection_test.py @@ -13,7 +13,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-TTLS-MSCHAP/connection_test.py b/autotests/testEAP-TTLS-MSCHAP/connection_test.py index 17250f59..3b51a547 100644 --- a/autotests/testEAP-TTLS-MSCHAP/connection_test.py +++ b/autotests/testEAP-TTLS-MSCHAP/connection_test.py @@ -31,7 +31,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent('abc', ('user', 'testpasswd')) wd.register_psk_agent(psk_agent) - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition) diff --git a/autotests/testEAP-TTLS-PAP/connection_test.py b/autotests/testEAP-TTLS-PAP/connection_test.py index c389071f..9a03e9d2 100644 --- a/autotests/testEAP-TTLS-PAP/connection_test.py +++ b/autotests/testEAP-TTLS-PAP/connection_test.py @@ -31,7 +31,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent('abc', ('user', 'testpasswd')) wd.register_psk_agent(psk_agent) - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] condition = 'not obj.scanning' wd.wait_for_object_condition(device, condition) diff --git a/autotests/testEAP-TTLS/connection_test.py b/autotests/testEAP-TTLS/connection_test.py index c3b376ab..1189309e 100644 --- a/autotests/testEAP-TTLS/connection_test.py +++ b/autotests/testEAP-TTLS/connection_test.py @@ -14,7 +14,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testEAP-WPS-Frag/wps_frag_test.py b/autotests/testEAP-WPS-Frag/wps_frag_test.py index a285f340..9d106a75 100644 --- a/autotests/testEAP-WPS-Frag/wps_frag_test.py +++ b/autotests/testEAP-WPS-Frag/wps_frag_test.py @@ -16,7 +16,7 @@ class Test(unittest.TestCase): def test_push_button_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] device.wps_push_button() diff --git a/autotests/testEAP-WPS/wps_test.py b/autotests/testEAP-WPS/wps_test.py index 16e41111..4cabe34d 100644 --- a/autotests/testEAP-WPS/wps_test.py +++ b/autotests/testEAP-WPS/wps_test.py @@ -18,7 +18,7 @@ class Test(unittest.TestCase): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] device.wps_push_button() @@ -34,7 +34,7 @@ class Test(unittest.TestCase): def test_pin_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] pin = device.wps_generate_pin() self.hostapd.wps_pin(pin) @@ -52,7 +52,7 @@ class Test(unittest.TestCase): def test_4_digit_pin_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] pin = '1234' self.hostapd.wps_pin(pin) diff --git a/autotests/testFT-8021x-roam/test.py b/autotests/testFT-8021x-roam/test.py index d6abc7ed..b7948b03 100644 --- a/autotests/testFT-8021x-roam/test.py +++ b/autotests/testFT-8021x-roam/test.py @@ -26,7 +26,7 @@ class Test(unittest.TestCase): wd = IWD() - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Check that iwd selects BSS 0 first rule0.signal = -2000 @@ -107,7 +107,7 @@ class Test(unittest.TestCase): wd = IWD() - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Check that iwd selects BSS 0 first rule0.signal = -2000 diff --git a/autotests/testFT-PSK-roam/test.py b/autotests/testFT-PSK-roam/test.py index fc2694d9..d420963b 100644 --- a/autotests/testFT-PSK-roam/test.py +++ b/autotests/testFT-PSK-roam/test.py @@ -30,7 +30,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("EasilyGuessedPassword") wd.register_psk_agent(psk_agent) - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Check that iwd selects BSS 0 first rule0.signal = -2000 @@ -116,7 +116,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("EasilyGuessedPassword") wd.register_psk_agent(psk_agent) - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Check that iwd selects BSS 0 first rule0.signal = -2000 diff --git a/autotests/testHiddenNetworks/validation.py b/autotests/testHiddenNetworks/validation.py index d1c2ddbc..afc4b392 100644 --- a/autotests/testHiddenNetworks/validation.py +++ b/autotests/testHiddenNetworks/validation.py @@ -47,7 +47,7 @@ class TestConnectAutoconnect(unittest.TestCase): psk_agent = PSKAgent(["secret123"], ('domain\\User', 'Password')) wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testKnownNetworks/known_network_test.py b/autotests/testKnownNetworks/known_network_test.py index 8c8ae33d..2a75ffc6 100644 --- a/autotests/testKnownNetworks/known_network_test.py +++ b/autotests/testKnownNetworks/known_network_test.py @@ -10,7 +10,7 @@ from iwd import IWD class Test(unittest.TestCase): def connect_to_new_network(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testMFP-Options/connection_test.py b/autotests/testMFP-Options/connection_test.py index 6da3b61f..ab57ea39 100644 --- a/autotests/testMFP-Options/connection_test.py +++ b/autotests/testMFP-Options/connection_test.py @@ -65,7 +65,7 @@ class TestMFP(unittest.TestCase): psk_agent = PSKAgent( ['secret123', 'secret123', 'secret123'] ) wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testOpen/connection_test.py b/autotests/testOpen/connection_test.py index 1593bbff..e34f7874 100644 --- a/autotests/testOpen/connection_test.py +++ b/autotests/testOpen/connection_test.py @@ -14,7 +14,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testPreauth-roam/test.py b/autotests/testPreauth-roam/test.py index b6b1402a..b631ff70 100644 --- a/autotests/testPreauth-roam/test.py +++ b/autotests/testPreauth-roam/test.py @@ -62,7 +62,7 @@ class Test(unittest.TestCase): wd = IWD() - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Check that iwd selects BSS 0 first rule0.signal = -2500 diff --git a/autotests/testRSSIAgent/test.py b/autotests/testRSSIAgent/test.py index db9f0ae0..86e4e61c 100644 --- a/autotests/testRSSIAgent/test.py +++ b/autotests/testRSSIAgent/test.py @@ -23,7 +23,7 @@ class Test(unittest.TestCase): wd = IWD() - device = wd.list_devices(1)[0]; + device = wd.list_devices(1)[0] # Register agent early to catch any unexpected notifications agent = TstAgent() diff --git a/autotests/testSAQuery-spoofing/connection_test.py b/autotests/testSAQuery-spoofing/connection_test.py index 1eb46afa..5aa72101 100644 --- a/autotests/testSAQuery-spoofing/connection_test.py +++ b/autotests/testSAQuery-spoofing/connection_test.py @@ -37,7 +37,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testSAQuery/connection_test.py b/autotests/testSAQuery/connection_test.py index 095662fb..73893b8b 100644 --- a/autotests/testSAQuery/connection_test.py +++ b/autotests/testSAQuery/connection_test.py @@ -30,7 +30,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testScan/periodic_scan_test.py b/autotests/testScan/periodic_scan_test.py index bf9588c3..e35ebd5a 100644 --- a/autotests/testScan/periodic_scan_test.py +++ b/autotests/testScan/periodic_scan_test.py @@ -21,7 +21,7 @@ class Test(unittest.TestCase): def set_network(self, ssid): if ssid not in self.dict: - return; + return if self.dict[ssid]: raise Exception('Duplicated list entry') @@ -29,7 +29,7 @@ class Test(unittest.TestCase): self.dict[ssid] = True def validate_scan(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testScan/requested_scan_test.py b/autotests/testScan/requested_scan_test.py index 46453839..47b58d22 100644 --- a/autotests/testScan/requested_scan_test.py +++ b/autotests/testScan/requested_scan_test.py @@ -23,7 +23,7 @@ class Test(unittest.TestCase): def set_network(self, ssid): if ssid not in self.dict: - return; + return if self.dict[ssid]: raise Exception('Duplicated list entry') @@ -31,7 +31,7 @@ class Test(unittest.TestCase): self.dict[ssid] = True def validate_scan(self, wd): - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testWPA/connection_test.py b/autotests/testWPA/connection_test.py index ba3fa96f..7d5a4459 100644 --- a/autotests/testWPA/connection_test.py +++ b/autotests/testWPA/connection_test.py @@ -18,7 +18,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testWPA2-SHA256/connection_test.py b/autotests/testWPA2-SHA256/connection_test.py index 3bb2e68a..2589b797 100644 --- a/autotests/testWPA2-SHA256/connection_test.py +++ b/autotests/testWPA2-SHA256/connection_test.py @@ -17,7 +17,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testWPA2/connection_test.py b/autotests/testWPA2/connection_test.py index 5462c74e..80d40cff 100644 --- a/autotests/testWPA2/connection_test.py +++ b/autotests/testWPA2/connection_test.py @@ -18,7 +18,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/testWPA2/failure_test.py b/autotests/testWPA2/failure_test.py index b2252db1..0004e06f 100644 --- a/autotests/testWPA2/failure_test.py +++ b/autotests/testWPA2/failure_test.py @@ -18,7 +18,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("InvalidPassword") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) self.assertIsNotNone(devices) device = devices[0] diff --git a/autotests/testWPA2/password_test.py b/autotests/testWPA2/password_test.py index 0397d8ae..a8096185 100644 --- a/autotests/testWPA2/password_test.py +++ b/autotests/testWPA2/password_test.py @@ -15,7 +15,7 @@ class Test(unittest.TestCase): def test_connection_success(self): wd = IWD() - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] device.disconnect() diff --git a/autotests/testWPA2withMFP/connection_test.py b/autotests/testWPA2withMFP/connection_test.py index 3bb2e68a..2589b797 100644 --- a/autotests/testWPA2withMFP/connection_test.py +++ b/autotests/testWPA2withMFP/connection_test.py @@ -17,7 +17,7 @@ class Test(unittest.TestCase): psk_agent = PSKAgent("secret123") wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1); + devices = wd.list_devices(1) device = devices[0] condition = 'not obj.scanning' diff --git a/autotests/util/hostapd.py b/autotests/util/hostapd.py index a87df95c..64dee1fb 100644 --- a/autotests/util/hostapd.py +++ b/autotests/util/hostapd.py @@ -109,7 +109,7 @@ class HostapdCLI: if wname == self.ifname: with open(hostapd_map[wname].config, 'r') as f: # read in config file and search for key - cfg = f.read(); + cfg = f.read() match = re.search(r'%s=.*' % key, cfg) if match: return match.group(0).split('=')[1] @@ -131,7 +131,7 @@ class HostapdCLI: os.system('ifconfig %s up' % intf.name) os.system('hostapd -g %s -i %s %s &' % (intf.ctrl_interface, intf.name, intf.config)) - break; + break # set flag so hostapd can be killed after the test self._hostapd_restarted = True diff --git a/autotests/util/hwsim.py b/autotests/util/hwsim.py index a4eacbc4..34a5b2af 100755 --- a/autotests/util/hwsim.py +++ b/autotests/util/hwsim.py @@ -26,7 +26,7 @@ class HwsimDBusAbstract(iwd.AsyncOpAbstract): self._object_path = object_path proxy = self._bus.get_object(HWSIM_SERVICE, self._object_path) self._iface = dbus.Interface(proxy, self._iface_name) - self._prop_proxy = dbus.Interface(proxy, iwd.DBUS_PROPERTIES); + self._prop_proxy = dbus.Interface(proxy, iwd.DBUS_PROPERTIES) if properties is None: self._properties = self._prop_proxy.GetAll(self._iface_name) diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py index 942699ca..8a809239 100755 --- a/autotests/util/iwd.py +++ b/autotests/util/iwd.py @@ -127,7 +127,7 @@ class IWDDBusAbstract(AsyncOpAbstract): self._object_path = object_path proxy = self._bus.get_object(IWD_SERVICE, self._object_path) self._iface = dbus.Interface(proxy, self._iface_name) - self._prop_proxy = dbus.Interface(proxy, DBUS_PROPERTIES); + self._prop_proxy = dbus.Interface(proxy, DBUS_PROPERTIES) if properties is None: self._properties = self._prop_proxy.GetAll(self._iface_name) @@ -930,7 +930,7 @@ class IWD(AsyncOpAbstract): def create_in_storage(file_name, file_content): fo = open(IWD_STORAGE_DIR + '/' + file_name, 'w') - fo.write(file_content); + fo.write(file_content) fo.close() @staticmethod