The intention in commit
cc35ed3e257a ("tests: Permit passing multiple
valid tshark filters") was to permit passing multiple filters in order
to permit compatibility with older tshark versions. However, this did
not work as expected for the UnknownFieldsException.
Fix that by storing it in last_exception as for other errors. This fixes
running some EHT tests with older tshark versions.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
all_wlan_mgt = False
break
if not all_wlan_mgt:
- raise
- return _run_tshark(filename, filter, display, wait)
+ last_exception = e
+ continue
+ try:
+ return _run_tshark(filename, filter, display, wait)
+ except Exception as e:
+ last_exception = e
except AssertionError as e:
# Catch the error (and try the next provided filter)