aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hwsim/test_ap_pmf.py
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2019-01-24 07:45:41 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-26 10:11:35 (GMT)
commitbab493b90486b61c8feb2bc56d1769a08a75ab2a (patch)
tree559b603b78f56d8aa9d9ac6aa8d41c76178ff62f /tests/hwsim/test_ap_pmf.py
parent0dab477335d9ea8d71bdb631aab7483542ed1bd0 (diff)
downloadhostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.zip
hostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.tar.gz
hostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.tar.bz2
tests: Use python3 compatible "except" statement
This patch is made by using 2to3 command. $ find . -name *.py | xargs 2to3 -f except -w -n Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'tests/hwsim/test_ap_pmf.py')
-rw-r--r--tests/hwsim/test_ap_pmf.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py
index e2f6529..071f9e6 100644
--- a/tests/hwsim/test_ap_pmf.py
+++ b/tests/hwsim/test_ap_pmf.py
@@ -67,7 +67,7 @@ def test_ocv_sa_query(dev, apdev):
params["ocv"] = "1"
try:
hapd = hostapd.add_ap(apdev[0], params)
- except Exception, e:
+ except Exception as e:
if "Failed to set hostapd parameter ocv" in str(e):
raise HwsimSkip("OCV not supported")
raise
@@ -104,7 +104,7 @@ def test_ocv_sa_query_csa(dev, apdev):
params["ocv"] = "1"
try:
hapd = hostapd.add_ap(apdev[0], params)
- except Exception, e:
+ except Exception as e:
if "Failed to set hostapd parameter ocv" in str(e):
raise HwsimSkip("OCV not supported")
raise
@@ -194,7 +194,7 @@ def test_ap_pmf_negative(dev, apdev):
scan_freq="2412")
hwsim_utils.test_connectivity(dev[1], hapd)
raise Exception("PMF required STA connected to no PMF AP")
- except Exception, e:
+ except Exception as e:
logger.debug("Ignore expected exception: " + str(e))
wt.require_ap_no_pmf(apdev[0]['bssid'])