]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - tests/hwsim/tshark.py
tests: Use python3 compatible "except" statement
[thirdparty/hostap.git] / tests / hwsim / tshark.py
index b90f66258672a537be8c9a443d2f476f5c2b9286..81aee6c4b92939b015245f70ed46ac9abfbe2251 100644 (file)
@@ -39,7 +39,7 @@ def _run_tshark(filename, filter, display=None, wait=True):
             arg.append('-V')
         cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE)
-    except Exception, e:
+    except Exception as e:
         logger.info("Could run run tshark check: " + str(e))
         cmd = None
         return None
@@ -88,7 +88,7 @@ def run_tshark(filename, filter, display=None, wait=True):
     if display is None: display = []
     try:
         return _run_tshark(filename, filter, display, wait)
-    except UnknownFieldsException, e:
+    except UnknownFieldsException as e:
         all_wlan_mgt = True
         for f in e.fields:
             if not f.startswith('wlan_mgt.'):
@@ -108,7 +108,7 @@ def run_tshark_json(filename, filter):
     try:
         cmd = subprocess.Popen(arg, stdout=subprocess.PIPE,
                                stderr=subprocess.PIPE)
-    except Exception, e:
+    except Exception as e:
         logger.info("Could run run tshark: " + str(e))
         return None
     output = cmd.communicate()