]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/test_ap_pmf.py
tests: Use python3 compatible "except" statement
[thirdparty/hostap.git] / tests / hwsim / test_ap_pmf.py
index e2f6529b279d7be15113ab17cde83cdf99745b70..071f9e629d91b32a90822068bc238a3ff8dfe8da 100644 (file)
@@ -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'])