mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: Handle unexpected get_driver_status_field() error
If the current country code cannot be fetched, do not try to report the current value in the log since that will result in TypeError exception. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f382af2c1e
commit
78c823de4e
@ -537,7 +537,9 @@ def main():
|
|||||||
if check_country_00:
|
if check_country_00:
|
||||||
for d in dev:
|
for d in dev:
|
||||||
country = d.get_driver_status_field("country")
|
country = d.get_driver_status_field("country")
|
||||||
if country != "00":
|
if country is None:
|
||||||
|
logger.info(d.ifname + ": Could not fetch country code after the test case run")
|
||||||
|
elif country != "00":
|
||||||
d.dump_monitor()
|
d.dump_monitor()
|
||||||
logger.info(d.ifname + ": Country code not reset back to 00: is " + country)
|
logger.info(d.ifname + ": Country code not reset back to 00: is " + country)
|
||||||
print(d.ifname + ": Country code not reset back to 00: is " + country)
|
print(d.ifname + ": Country code not reset back to 00: is " + country)
|
||||||
|
Loading…
Reference in New Issue
Block a user