tests: Use python3 compatible "except" statement

This patch is made by using 2to3 command.

$ find . -name *.py | xargs 2to3 -f except -w -n

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
This commit is contained in:
Masashi Honma 2019-01-24 16:45:41 +09:00 committed by Jouni Malinen
parent 0dab477335
commit bab493b904
55 changed files with 331 additions and 331 deletions

View file

@ -310,7 +310,7 @@ def test_wnm_sleep_mode_rsn_ocv(dev, apdev):
params["bss_transition"] = "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
@ -343,7 +343,7 @@ def test_wnm_sleep_mode_rsn_badocv(dev, apdev):
params['wnm_sleep_mode'] = '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