]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove trailing semicolons from python code
authorJouni Malinen <j@w1.fi>
Sat, 2 Feb 2019 10:10:53 +0000 (12:10 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 2 Feb 2019 10:10:53 +0000 (12:10 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
12 files changed:
tests/hwsim/test_ap_ft.py
tests/hwsim/test_ap_hs20.py
tests/hwsim/test_ap_roam.py
tests/hwsim/test_ap_track.py
tests/hwsim/test_authsrv.py
tests/hwsim/test_dpp.py
tests/hwsim/test_fils.py
tests/hwsim/test_oce.py
tests/hwsim/test_scan.py
tests/hwsim/test_sigma_dut.py
tests/hwsim/test_suite_b.py
tests/hwsim/test_wmediumd.py

index c1c46655e806ae8654fde9d938e7c556ae1e0fae..05c541cac384e67b36a295ee2f333786c72827d8 100644 (file)
@@ -270,11 +270,11 @@ def test_ap_ft_local_key_gen(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1a(ssid=ssid, passphrase=passphrase)
-    params['ft_psk_generate_local'] = "1";
+    params['ft_psk_generate_local'] = "1"
     del params['pmk_r1_push']
     hapd0 = hostapd.add_ap(apdev[0], params)
     params = ft_params2a(ssid=ssid, passphrase=passphrase)
-    params['ft_psk_generate_local'] = "1";
+    params['ft_psk_generate_local'] = "1"
     del params['pmk_r1_push']
     hapd1 = hostapd.add_ap(apdev[1], params)
 
@@ -288,13 +288,13 @@ def test_ap_ft_vlan(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
 
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, conndev="brvlan1")
@@ -307,15 +307,15 @@ def test_ap_ft_vlan_disconnected(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1a(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
-    params['ft_psk_generate_local'] = "1";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
+    params['ft_psk_generate_local'] = "1"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
 
     params = ft_params2a(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
-    params['ft_psk_generate_local'] = "1";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
+    params['ft_psk_generate_local'] = "1"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, conndev="brvlan1")
@@ -328,12 +328,12 @@ def test_ap_ft_vlan_2(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
 
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
+    params['dynamic_vlan'] = "1"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, conndev="brvlan1",
@@ -359,13 +359,13 @@ def test_ap_ft_many_vlan(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
 
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, roams=50,
@@ -615,12 +615,12 @@ def test_ap_ft_vlan_over_ds(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
@@ -647,12 +647,12 @@ def test_ap_ft_vlan_over_ds_many(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
@@ -854,13 +854,13 @@ def test_ap_ft_over_ds_pull_vlan(dev, apdev):
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
     params["pmk_r1_push"] = "0"
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd0 = hostapd.add_ap(apdev[0]['ifname'], params)
     params = ft_params2(ssid=ssid, passphrase=passphrase)
     params["pmk_r1_push"] = "0"
-    params['dynamic_vlan'] = "1";
-    params['accept_mac_file'] = "hostapd.accept";
+    params['dynamic_vlan'] = "1"
+    params['accept_mac_file'] = "hostapd.accept"
     hapd1 = hostapd.add_ap(apdev[1]['ifname'], params)
 
     run_roams(dev[0], apdev, hapd0, hapd1, ssid, passphrase, over_ds=True,
@@ -1169,13 +1169,13 @@ def test_ap_ft_mismatching_rrb_key_push_eap(dev, apdev):
 
     radius = hostapd.radius_params()
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
     hapd0 = hostapd.add_ap(apdev[0], params)
     params = ft_params2_incorrect_rrb_key(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
@@ -1241,13 +1241,13 @@ def test_ap_ft_mismatching_rrb_r0kh_push_eap(dev, apdev):
 
     radius = hostapd.radius_params()
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
     hapd0 = hostapd.add_ap(apdev[0], params)
     params = ft_params2_r0kh_mismatch(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
@@ -1828,7 +1828,7 @@ def test_ap_ft_ap_oom8(dev, apdev):
     passphrase="12345678"
 
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params['ft_psk_generate_local'] = "1";
+    params['ft_psk_generate_local'] = "1"
     hapd0 = hostapd.add_ap(apdev[0], params)
     bssid0 = hapd0.own_addr()
 
@@ -1837,7 +1837,7 @@ def test_ap_ft_ap_oom8(dev, apdev):
                    scan_freq="2412")
 
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params['ft_psk_generate_local'] = "1";
+    params['ft_psk_generate_local'] = "1"
     hapd1 = hostapd.add_ap(apdev[1], params)
     bssid1 = hapd1.own_addr()
     dev[0].scan_for_bss(bssid1, freq="2412")
@@ -2614,13 +2614,13 @@ def test_ap_ft_eap_sha384(dev, apdev):
 
     radius = hostapd.radius_params()
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP-SHA384"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
     hapd0 = hostapd.add_ap(apdev[0], params)
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP-SHA384"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
@@ -2636,13 +2636,13 @@ def test_ap_ft_eap_sha384_over_ds(dev, apdev):
 
     radius = hostapd.radius_params()
     params = ft_params1(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP-SHA384"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
     hapd0 = hostapd.add_ap(apdev[0], params)
     params = ft_params2(ssid=ssid, passphrase=passphrase)
-    params["ieee80211w"] = "2";
+    params["ieee80211w"] = "2"
     params['wpa_key_mgmt'] = "FT-EAP-SHA384"
     params["ieee8021x"] = "1"
     params = dict(list(radius.items()) + list(params.items()))
index ef08f6533c9f98487e30a86995c66c12089f42d4..977b9d1f65f1b9e6fab7b8ab8f375f30826d6198 100644 (file)
@@ -5815,7 +5815,7 @@ def test_ap_hs20_set_profile_failures(dev, apdev):
                                   'realm': "example.com",
                                   'username': "user",
                                   'eap': "PEAP" })
-    dev[0].set_cred(id, "password", "ext:password");
+    dev[0].set_cred(id, "password", "ext:password")
     interworking_select(dev[0], bssid, "home", freq=2412)
     dev[0].dump_monitor()
     dev[0].request("NOTE wpa_config_set(password)")
index 63a0b2c202801648cdc5fa795e070245a7d8ad10..575239f3bfc9154b6529ae0e676c7e48fb75a5b8 100644 (file)
@@ -97,7 +97,7 @@ def test_ap_reconnect_auth_timeout(dev, apdev, params):
     time.sleep(10)
     ev = wpas.wait_event(["CTRL-EVENT-SCAN-STARTED"], 12)
     if not ev:
-        raise Exception("CTRL-EVENT-SCAN-STARTED not seen");
+        raise Exception("CTRL-EVENT-SCAN-STARTED not seen")
 
     b = get_blacklist(wpas)
     if '00:00:00:00:00:00' in b:
@@ -133,7 +133,7 @@ def test_ap_roam_with_reassoc_auth_timeout(dev, apdev, params):
     time.sleep(10)
     ev = wpas.wait_event(["CTRL-EVENT-SCAN-STARTED"], 12)
     if not ev:
-        raise Exception("CTRL-EVENT-SCAN-STARTED not seen");
+        raise Exception("CTRL-EVENT-SCAN-STARTED not seen")
 
     b = get_blacklist(wpas)
     if bssid0 in b:
index 765aa4314311c39e02314f6653365125c67c20fa..4444e398f6abcc9fdce9cb4d41e7b861236a0b3b 100644 (file)
@@ -355,11 +355,11 @@ def _test_ap_track_taxonomy(dev, apdev):
     if "|assoc:" not in res:
         raise Exception("Missing assoc info in SIGNATURE")
     if "wps:" in res:
-        raise Exception("Unexpected WPS info");
+        raise Exception("Unexpected WPS info")
     if ",221(0050f2,4)," in res:
-        raise Exception("Unexpected WPS IE info");
+        raise Exception("Unexpected WPS IE info")
     if ",221(506f9a,9)," in res:
-        raise Exception("Unexpected P2P IE info");
+        raise Exception("Unexpected P2P IE info")
 
     res = hapd.request("SIGNATURE " + addr)
     logger.info("sta: " + res)
@@ -370,9 +370,9 @@ def _test_ap_track_taxonomy(dev, apdev):
     if "wps:track_test" not in res:
         raise Exception("Missing WPS model name")
     if ",221(0050f2,4)," not in res:
-        raise Exception("Missing WPS IE info");
+        raise Exception("Missing WPS IE info")
     if ",221(506f9a,9)," not in res:
-        raise Exception("Missing P2P IE info");
+        raise Exception("Missing P2P IE info")
 
     addr2 = dev[2].own_addr()
     res = hapd.request("SIGNATURE " + addr2)
index 0439ff933a6634156a6667c6ab2270981cd1c662..ef117280a99fea67f7ae48a68b0e978967638d2c 100644 (file)
@@ -18,7 +18,7 @@ def authsrv_params():
                "server_cert": "auth_serv/server.pem",
                "private_key": "auth_serv/server.key",
                "eap_message": "hello" }
-    return params;
+    return params
 
 def test_authsrv_oom(dev, apdev):
     """Authentication server OOM"""
index c02b17fad3e3cb0791e20c8304b8031f6fc19b9b..aa3a13a192861c4d9dc604a448c41059a2add33a 100644 (file)
@@ -313,7 +313,7 @@ def run_dpp_qr_code_auth_unicast(dev, apdev, curve, netrole=None, key=None,
         cmd = "DPP_CONFIGURATOR_ADD"
         if conf_curve:
             cmd += " curve=" + conf_curve
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -988,7 +988,7 @@ def test_dpp_qr_code_auth_neg_chan(dev, apdev):
 
     logger.info("Create configurator on dev1")
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -1977,7 +1977,7 @@ def run_dpp_ap_config(dev, apdev, curve=None, conf_curve=None,
     cmd = "DPP_CONFIGURATOR_ADD"
     if conf_curve:
         cmd += " curve=" + conf_curve
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2035,7 +2035,7 @@ def run_dpp_ap_config(dev, apdev, curve=None, conf_curve=None,
         if conf_curve:
             cmd += " curve=" + conf_curve
         cmd += " key=" + csign
-        res = dev[0].request(cmd);
+        res = dev[0].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator (reconf)")
         conf_id = int(res)
@@ -2346,7 +2346,7 @@ def run_dpp_qr_code_auth_responder_configurator(dev, apdev, extra):
     check_dpp_capab(dev[0])
     check_dpp_capab(dev[1])
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2365,7 +2365,7 @@ def run_dpp_qr_code_auth_responder_configurator(dev, apdev, extra):
     id1 = int(res)
 
     dev[0].set("dpp_configurator_params",
-               " conf=sta-dpp configurator=%d%s" % (conf_id, extra));
+               " conf=sta-dpp configurator=%d%s" % (conf_id, extra))
     cmd = "DPP_LISTEN 2412 role=configurator"
     if "OK" not in dev[0].request(cmd):
         raise Exception("Failed to start listen operation")
@@ -2396,7 +2396,7 @@ def test_dpp_qr_code_hostapd_init(dev, apdev):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2410,7 +2410,7 @@ def test_dpp_qr_code_hostapd_init(dev, apdev):
     uri0 = dev[0].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
     dev[0].set("dpp_configurator_params",
-               " conf=ap-dpp configurator=%d" % conf_id);
+               " conf=ap-dpp configurator=%d" % conf_id)
     cmd = "DPP_LISTEN 2437 role=configurator"
     if "OK" not in dev[0].request(cmd):
         raise Exception("Failed to start listen operation")
@@ -2453,7 +2453,7 @@ def run_dpp_qr_code_hostapd_init_offchannel(dev, apdev, extra):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2467,7 +2467,7 @@ def run_dpp_qr_code_hostapd_init_offchannel(dev, apdev, extra):
     uri0 = dev[0].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
     dev[0].set("dpp_configurator_params",
-               " conf=ap-dpp configurator=%d" % conf_id);
+               " conf=ap-dpp configurator=%d" % conf_id)
     cmd = "DPP_LISTEN 2462 role=configurator"
     if "OK" not in dev[0].request(cmd):
         raise Exception("Failed to start listen operation")
@@ -2722,7 +2722,7 @@ def test_dpp_pkex_config(dev, apdev):
     check_dpp_capab(dev[1])
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3191,13 +3191,13 @@ def test_dpp_pkex_config2(dev, apdev):
     check_dpp_capab(dev[0])
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
 
     dev[0].set("dpp_configurator_params",
-               " conf=sta-dpp configurator=%d" % conf_id);
+               " conf=sta-dpp configurator=%d" % conf_id)
     run_dpp_pkex2(dev, apdev)
 
 def run_dpp_pkex2(dev, apdev, curve=None, init_extra=""):
@@ -3332,7 +3332,7 @@ def test_dpp_pkex_hostapd_responder(dev, apdev):
         raise Exception("Failed to set PKEX data (responder/hostapd)")
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3371,7 +3371,7 @@ def test_dpp_pkex_hostapd_initiator(dev, apdev):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3383,7 +3383,7 @@ def test_dpp_pkex_hostapd_initiator(dev, apdev):
     id0 = int(res)
 
     dev[0].set("dpp_configurator_params",
-               " conf=ap-dpp configurator=%d" % conf_id);
+               " conf=ap-dpp configurator=%d" % conf_id)
 
     cmd = "DPP_PKEX_ADD own=%d identifier=test code=secret" % (id0)
     res = dev[0].request(cmd)
@@ -3428,7 +3428,7 @@ def test_dpp_hostapd_configurator(dev, apdev):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = hapd.request(cmd);
+    res = hapd.request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3484,13 +3484,13 @@ def test_dpp_hostapd_configurator_responder(dev, apdev):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = hapd.request(cmd);
+    res = hapd.request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
 
     hapd.set("dpp_configurator_params",
-             " conf=sta-dpp configurator=%d" % conf_id);
+             " conf=sta-dpp configurator=%d" % conf_id)
 
     addr = hapd.own_addr().replace(':', '')
     cmd = "DPP_BOOTSTRAP_GEN type=qrcode chan=81/1 mac=" + addr
@@ -3560,7 +3560,7 @@ def run_dpp_own_config(dev, apdev, own_curve=None, expect_failure=False,
     uri = hapd.request("DPP_BOOTSTRAP_GET_URI %d" % id_h)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3604,7 +3604,7 @@ def run_dpp_own_config(dev, apdev, own_curve=None, expect_failure=False,
     if expect_failure:
         ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=1)
         if ev is not None:
-            raise Exception("Unexpected connection");
+            raise Exception("Unexpected connection")
         dev[0].request("DISCONNECT")
     else:
         dev[0].wait_connected()
@@ -3636,7 +3636,7 @@ def run_dpp_own_config_ap(dev, apdev, reconf_configurator=False, extra=""):
     check_dpp_capab(hapd)
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = hapd.request(cmd);
+    res = hapd.request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3657,7 +3657,7 @@ def run_dpp_own_config_ap(dev, apdev, reconf_configurator=False, extra=""):
         if "OK" not in res:
             raise Exception("DPP_CONFIGURATOR_REMOVE failed")
         cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-        res = hapd.request(cmd);
+        res = hapd.request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator (reconf)")
         conf_id = int(res)
@@ -3727,7 +3727,7 @@ def run_dpp_intro_mismatch(dev, apdev, wpas):
     uri = hapd.request("DPP_BOOTSTRAP_GET_URI %d" % id_h)
 
     logger.info("Provision AP with DPP configuration")
-    res = dev[1].request("DPP_CONFIGURATOR_ADD");
+    res = dev[1].request("DPP_CONFIGURATOR_ADD")
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -3792,7 +3792,7 @@ def run_dpp_intro_mismatch(dev, apdev, wpas):
     if "OK" not in dev[2].request(cmd):
         raise Exception("Failed to start listen operation")
 
-    res = dev[1].request("DPP_CONFIGURATOR_ADD");
+    res = dev[1].request("DPP_CONFIGURATOR_ADD")
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id_2 = int(res)
@@ -3913,7 +3913,7 @@ def run_dpp_proto_init(dev, test_dev, test, mutual=False, unicast=True,
         else:
             cmd += " role=configurator"
         dev[0].set("dpp_configurator_params",
-                   " conf=sta-dpp configurator=%d" % conf_id);
+                   " conf=sta-dpp configurator=%d" % conf_id)
     elif incompatible_roles:
         cmd += " role=enrollee"
 
@@ -4881,12 +4881,12 @@ def test_dpp_pkex_alloc_fail(dev, apdev):
     for count, func in tests:
         with alloc_fail(dev[1], count, func):
             cmd = "DPP_CONFIGURATOR_ADD"
-            res = dev[1].request(cmd);
+            res = dev[1].request(cmd)
             if "FAIL" not in res:
                 raise Exception("Unexpected DPP_CONFIGURATOR_ADD success")
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -5023,7 +5023,7 @@ def test_dpp_pkex_test_fail(dev, apdev):
     for count, func in tests:
         with fail_test(dev[1], count, func):
             cmd = "DPP_CONFIGURATOR_ADD"
-            res = dev[1].request(cmd);
+            res = dev[1].request(cmd)
             if "FAIL" not in res:
                 raise Exception("Unexpected DPP_CONFIGURATOR_ADD success")
 
@@ -5031,12 +5031,12 @@ def test_dpp_pkex_test_fail(dev, apdev):
     for count, func in tests:
         with fail_test(dev[1], count, func):
             cmd = "DPP_BOOTSTRAP_GEN type=pkex"
-            res = dev[1].request(cmd);
+            res = dev[1].request(cmd)
             if "FAIL" not in res:
                 raise Exception("Unexpected DPP_BOOTSTRAP_GEN success")
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -5517,7 +5517,7 @@ def test_dpp_invalid_configurator_key(dev, apdev):
 def test_dpp_own_config_sign_fail(dev, apdev):
     """DPP own config signing failure"""
     check_dpp_capab(dev[0])
-    res = dev[0].request("DPP_CONFIGURATOR_ADD");
+    res = dev[0].request("DPP_CONFIGURATOR_ADD")
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -5542,7 +5542,7 @@ def run_dpp_peer_intro_failures(dev, apdev):
     hapd = hostapd.add_ap(apdev[0], { "ssid": "unconfigured" })
     check_dpp_capab(hapd)
 
-    res = hapd.request("DPP_CONFIGURATOR_ADD key=" + dpp_key_p256);
+    res = hapd.request("DPP_CONFIGURATOR_ADD key=" + dpp_key_p256)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -5550,7 +5550,7 @@ def run_dpp_peer_intro_failures(dev, apdev):
     if "FAIL" in csign or len(csign) == 0:
         raise Exception("DPP_CONFIGURATOR_GET_KEY failed")
 
-    res = dev[0].request("DPP_CONFIGURATOR_ADD key=" + csign);
+    res = dev[0].request("DPP_CONFIGURATOR_ADD key=" + csign)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id2 = int(res)
@@ -5796,7 +5796,7 @@ def test_dpp_network_addition_failure(dev, apdev):
 def run_dpp_network_addition_failure(dev, apdev):
     check_dpp_capab(dev[0])
 
-    res = dev[0].request("DPP_CONFIGURATOR_ADD");
+    res = dev[0].request("DPP_CONFIGURATOR_ADD")
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
index f4c5af2a9083a9847422e36b27fe591c8e1aa389..0d0c6f5d5ee7f49a926951d26c8b1db7e068c168 100644 (file)
@@ -613,7 +613,7 @@ def test_fils_sk_multiple_realms(dev, apdev, params):
 
     if 'anqp_fils_realm_info' not in bss:
         raise Exception("FILS Realm Information ANQP-element not seen")
-    info = bss['anqp_fils_realm_info'];
+    info = bss['anqp_fils_realm_info']
     expected = ''
     for realm in fils_realms:
         hash = hashlib.sha256(realm.lower()).digest()
index 041ad15f8d61021bffa249d52eeceff111003790..be16c3d66460b8239736b52a9cc2bf68e34e747d 100644 (file)
@@ -57,7 +57,7 @@ def run_rssi_based_assoc_rej_timeout(dev, apdev, params):
     if ev is None:
         raise Exception("Association not rejected")
     if 'status_code=34' not in ev:
-        raise Exception("STA assoc request was not rejected with status code 34: " + ev);
+        raise Exception("STA assoc request was not rejected with status code 34: " + ev)
     t_rej = datetime.now()
 
     # Set the scan interval to make dev[0] look for connections
index adb36f98043bd60cf5f0e3affa4c43c003edcb1e..a468f029fbb866097b8fcd371f35a5f2e9e5e757 100644 (file)
@@ -1781,7 +1781,7 @@ def test_scan_multiple_mbssid_ie(dev, apdev):
     dev[0].flush_scan_cache()
 
     bssid = apdev[0]['bssid']
-    logger.info("bssid: " + bssid);
+    logger.info("bssid: " + bssid)
     hapd = None
 
     # construct 2 MBSSID IEs, each MBSSID IE contains 1 profile
@@ -1808,7 +1808,7 @@ def test_scan_mbssid_hidden_ssid(dev, apdev):
     dev[0].flush_scan_cache()
 
     bssid = apdev[0]['bssid']
-    logger.info("bssid: " + bssid);
+    logger.info("bssid: " + bssid)
     hapd = None
 
     # construct 2 MBSSID IEs, each MBSSID IE contains 1 profile
index 3641a9dcf11eeba721e09db460826154dc7e3f53..b4a2d0379833f20bd9ffc4a008db0686583e7529 100644 (file)
@@ -1013,7 +1013,7 @@ def test_sigma_dut_dpp_qr_init_enrollee(dev, apdev):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1027,7 +1027,7 @@ def test_sigma_dut_dpp_qr_init_enrollee(dev, apdev):
         uri0 = dev[1].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
         dev[1].set("dpp_configurator_params",
-                   " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id));
+                   " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id))
         cmd = "DPP_LISTEN 2437 role=configurator"
         if "OK" not in dev[1].request(cmd):
             raise Exception("Failed to start listen operation")
@@ -1079,7 +1079,7 @@ def run_sigma_dut_dpp_qr_mutual_init_enrollee_check(dev, apdev, extra=''):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1093,7 +1093,7 @@ def run_sigma_dut_dpp_qr_mutual_init_enrollee_check(dev, apdev, extra=''):
         uri0 = dev[1].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
         dev[1].set("dpp_configurator_params",
-                   " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id));
+                   " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id))
         cmd = "DPP_LISTEN 2437 role=configurator qr=mutual"
         if "OK" not in dev[1].request(cmd):
             raise Exception("Failed to start listen operation")
@@ -1169,7 +1169,7 @@ def run_sigma_dut_dpp_qr_mutual_resp_enrollee(dev, apdev, extra=None):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1216,7 +1216,7 @@ def run_sigma_dut_dpp_qr_mutual_resp_enrollee(dev, apdev, extra=None):
 def dpp_resp_conf_mutual(dev, conf_id, uri):
     logger.info("Starting DPP responder/configurator in a thread")
     dev.set("dpp_configurator_params",
-            " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id));
+            " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id))
     cmd = "DPP_LISTEN 2437 role=configurator qr=mutual"
     if "OK" not in dev.request(cmd):
         raise Exception("Failed to initiate DPP listen")
@@ -1267,7 +1267,7 @@ def run_sigma_dut_dpp_qr_mutual_init_enrollee(dev, apdev, resp_pending):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1325,7 +1325,7 @@ def test_sigma_dut_dpp_qr_init_enrollee_psk(dev, apdev):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD"
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1339,7 +1339,7 @@ def test_sigma_dut_dpp_qr_init_enrollee_psk(dev, apdev):
         uri0 = dev[1].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
         dev[1].set("dpp_configurator_params",
-                   " conf=sta-psk ssid=%s pass=%s configurator=%d" % ("DPPNET01".encode("hex"), "ThisIsDppPassphrase".encode("hex"), conf_id));
+                   " conf=sta-psk ssid=%s pass=%s configurator=%d" % ("DPPNET01".encode("hex"), "ThisIsDppPassphrase".encode("hex"), conf_id))
         cmd = "DPP_LISTEN 2437 role=configurator"
         if "OK" not in dev[1].request(cmd):
             raise Exception("Failed to start listen operation")
@@ -1373,7 +1373,7 @@ def test_sigma_dut_dpp_qr_init_enrollee_sae(dev, apdev):
         dev[0].set("dpp_config_processing", "2")
 
         cmd = "DPP_CONFIGURATOR_ADD"
-        res = dev[1].request(cmd);
+        res = dev[1].request(cmd)
         if "FAIL" in res:
             raise Exception("Failed to add configurator")
         conf_id = int(res)
@@ -1387,7 +1387,7 @@ def test_sigma_dut_dpp_qr_init_enrollee_sae(dev, apdev):
         uri0 = dev[1].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
         dev[1].set("dpp_configurator_params",
-                   " conf=sta-sae ssid=%s pass=%s configurator=%d" % ("DPPNET01".encode("hex"), "ThisIsDppPassphrase".encode("hex"), conf_id));
+                   " conf=sta-sae ssid=%s pass=%s configurator=%d" % ("DPPNET01".encode("hex"), "ThisIsDppPassphrase".encode("hex"), conf_id))
         cmd = "DPP_LISTEN 2437 role=configurator"
         if "OK" not in dev[1].request(cmd):
             raise Exception("Failed to start listen operation")
@@ -1629,7 +1629,7 @@ def run_sigma_dut_ap_dpp_qr(dev, apdev, params, ap_conf, sta_conf, extra=""):
             logger.info("URI from sigma_dut: " + uri)
 
             cmd = "DPP_CONFIGURATOR_ADD"
-            res = dev[0].request(cmd);
+            res = dev[0].request(cmd)
             if "FAIL" in res:
                 raise Exception("Failed to add configurator")
             conf_id = int(res)
@@ -1709,7 +1709,7 @@ def run_sigma_dut_ap_dpp_pkex_responder(dev, apdev):
     sigma_dut_cmd_check("ap_reset_default,program,DPP")
 
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[0].request(cmd);
+    res = dev[0].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -1734,7 +1734,7 @@ def test_sigma_dut_dpp_pkex_responder_proto(dev, apdev):
 
 def run_sigma_dut_dpp_pkex_responder_proto(dev, apdev):
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -1753,7 +1753,7 @@ def dpp_proto_init(dev, id1):
     time.sleep(1)
     logger.info("Starting DPP initiator/configurator in a thread")
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev.request(cmd);
+    res = dev.request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2015,7 +2015,7 @@ def dpp_proto_init_pkex(dev):
     time.sleep(1)
     logger.info("Starting DPP PKEX initiator/configurator in a thread")
     cmd = "DPP_CONFIGURATOR_ADD"
-    res = dev.request(cmd);
+    res = dev.request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2145,7 +2145,7 @@ def init_sigma_dut_dpp_proto_peer_disc_req(dev, apdev):
     dev[0].set("dpp_config_processing", "2")
 
     cmd = "DPP_CONFIGURATOR_ADD key=" + csign
-    res = dev[1].request(cmd);
+    res = dev[1].request(cmd)
     if "FAIL" in res:
         raise Exception("Failed to add configurator")
     conf_id = int(res)
@@ -2159,7 +2159,7 @@ def init_sigma_dut_dpp_proto_peer_disc_req(dev, apdev):
     uri0 = dev[1].request("DPP_BOOTSTRAP_GET_URI %d" % id0)
 
     dev[1].set("dpp_configurator_params",
-               " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id));
+               " conf=sta-dpp ssid=%s configurator=%d" % ("DPPNET01".encode("hex"), conf_id))
     cmd = "DPP_LISTEN 2437 role=configurator"
     if "OK" not in dev[1].request(cmd):
         raise Exception("Failed to start listen operation")
index 762e7e3f279b8deb5b973f3f9abb0380c85eebe7..79b015af1c62607a31f6d1fbfaa25755d82465e3 100644 (file)
@@ -300,7 +300,7 @@ def test_suite_b_192_radius_and_p256_cert(dev, apdev):
     if ev is None:
         raise Exception("Disconnection not reported")
     if "reason=23" not in ev:
-        raise Exception("Unexpected disconnection reason: " + ev);
+        raise Exception("Unexpected disconnection reason: " + ev)
 
 def test_suite_b_pmkid_failure(dev, apdev):
     """WPA2/GCMP connection at Suite B 128-bit level and PMKID derivation failure"""
@@ -608,4 +608,4 @@ def run_suite_b_192_rsa_radius_rsa2048_client(dev, apdev, ecdhe):
     if ev is None:
         raise Exception("Disconnection not reported")
     if "reason=23" not in ev:
-        raise Exception("Unexpected disconnection reason: " + ev);
+        raise Exception("Unexpected disconnection reason: " + ev)
index f17a02776ce7927cc7469b6709881e381e6ec33a..d30f27c3fb88fc53859ddbf10f059179e4eb27be 100644 (file)
@@ -19,54 +19,54 @@ class LocalVariables:
 CFG = """
 ifaces :
 {
-    ids = ["%s", "%s" ];
+    ids = ["%s", "%s" ]
     links = (
         (0, 1, 30)
-    );
-};
+    )
+}
 """
 
 CFG2 = """
 ifaces :
 {
-    ids = ["%s", "%s", "%s"];
-};
+    ids = ["%s", "%s", "%s"]
+}
 
 model:
 {
-    type = "prob";
+    type = "prob"
 
     links = (
         (0, 1, 0.000000),
         (0, 2, 0.000000),
         (1, 2, 1.000000)
-    );
-};
+    )
+}
 """
 
 CFG3 = """
 ifaces :
 {
-    ids = ["%s", "%s", "%s", "%s", "%s" ];
-};
+    ids = ["%s", "%s", "%s", "%s", "%s" ]
+}
 
 model:
 {
-    type = "prob";
+    type = "prob"
 
-    default_prob = 1.0;
+    default_prob = 1.0
     links = (
         (0, 1, 0.000000),
         (1, 2, 0.000000),
         (2, 3, 0.000000),
         (3, 4, 0.000000)
-    );
-};
+    )
+}
 """
 
 def get_wmediumd_version():
     if len(LocalVariables.revs) > 0:
-        return LocalVariables.revs;
+        return LocalVariables.revs
 
     try:
         verstr = subprocess.check_output(['wmediumd', '-V'])
@@ -82,7 +82,7 @@ def get_wmediumd_version():
     while len(LocalVariables.revs) < 3:
         LocalVariables.revs += [0]
 
-    return LocalVariables.revs;
+    return LocalVariables.revs
 
 def require_wmediumd_version(major, minor, patch):
     revs = get_wmediumd_version()