]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/test_wpas_wmm_ac.py
tests: Use python3 compatible "except" statement
[thirdparty/hostap.git] / tests / hwsim / test_wpas_wmm_ac.py
index 149dd72338e842eefb01e27c5afe649d2040acc8..f81588a1824e402985e35a87403ef942fb71c860 100644 (file)
@@ -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