aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hwsim/test_wpas_wmm_ac.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_wpas_wmm_ac.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_wpas_wmm_ac.py')
-rw-r--r--tests/hwsim/test_wpas_wmm_ac.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/hwsim/test_wpas_wmm_ac.py b/tests/hwsim/test_wpas_wmm_ac.py
index 149dd72..f81588a 100644
--- a/tests/hwsim/test_wpas_wmm_ac.py
+++ b/tests/hwsim/test_wpas_wmm_ac.py
@@ -60,7 +60,7 @@ def test_tspec(dev, apdev):
try:
dev[0].add_ts(tsid, 3)
raise Exception("ADDTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("ADDTS failed"):
raise
status = dev[0].request("WMM_AC_STATUS")
@@ -77,7 +77,7 @@ def test_tspec(dev, apdev):
try:
dev[0].add_ts(tsid, 5)
raise Exception("ADDTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("ADDTS failed"):
raise
@@ -93,13 +93,13 @@ def test_tspec(dev, apdev):
try:
dev[0].add_ts(tsid, 7, direction="uplink")
raise Exception("ADDTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("ADDTS failed"):
raise
try:
dev[0].add_ts(tsid, 7, direction="bidi")
raise Exception("ADDTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("ADDTS failed"):
raise
@@ -107,7 +107,7 @@ def test_tspec(dev, apdev):
try:
dev[0].del_ts(tsid)
raise Exception("DELTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("DELTS failed"):
raise
@@ -231,7 +231,7 @@ def test_tspec_not_enabled(dev, apdev):
try:
dev[0].add_ts(5, 6)
raise Exception("ADDTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("ADDTS failed"):
raise
@@ -239,7 +239,7 @@ def test_tspec_not_enabled(dev, apdev):
try:
dev[0].del_ts(5)
raise Exception("DELTS succeeded although it should have failed")
- except Exception, e:
+ except Exception as e:
if not str(e).startswith("DELTS failed"):
raise