aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/wps-ap-nfc.py
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2019-01-24 07:45:41 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-26 10:11:35 (GMT)
commitbab493b90486b61c8feb2bc56d1769a08a75ab2a (patch)
tree559b603b78f56d8aa9d9ac6aa8d41c76178ff62f /hostapd/wps-ap-nfc.py
parent0dab477335d9ea8d71bdb631aab7483542ed1bd0 (diff)
downloadhostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.zip
hostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.tar.gz
hostap-bab493b90486b61c8feb2bc56d1769a08a75ab2a.tar.bz2
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>
Diffstat (limited to 'hostapd/wps-ap-nfc.py')
-rwxr-xr-xhostapd/wps-ap-nfc.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/hostapd/wps-ap-nfc.py b/hostapd/wps-ap-nfc.py
index 2fc3012..9e24d60 100755
--- a/hostapd/wps-ap-nfc.py
+++ b/hostapd/wps-ap-nfc.py
@@ -42,7 +42,7 @@ def wpas_connect():
if os.path.isdir(wpas_ctrl):
try:
ifaces = [os.path.join(wpas_ctrl, i) for i in os.listdir(wpas_ctrl)]
- except OSError, error:
+ except OSError as error:
print "Could not find hostapd: ", error
return None
@@ -54,7 +54,7 @@ def wpas_connect():
try:
wpas = wpaspy.Ctrl(ctrl)
return wpas
- except Exception, e:
+ except Exception as e:
pass
return None
@@ -134,7 +134,7 @@ class HandoverServer(nfc.handover.HandoverServer):
summary("HandoverServer - request received")
try:
print "Parsed handover request: " + request.pretty()
- except Exception, e:
+ except Exception as e:
print e
print str(request).encode("hex")
@@ -161,7 +161,7 @@ class HandoverServer(nfc.handover.HandoverServer):
print "Handover select:"
try:
print sel.pretty()
- except Exception, e:
+ except Exception as e:
print e
print str(sel).encode("hex")
@@ -236,7 +236,7 @@ def rdwr_connected(tag):
print "NDEF tag: " + tag.type
try:
print tag.ndef.message.pretty()
- except Exception, e:
+ except Exception as e:
print e
success = wps_tag_read(tag)
if only_one and success:
@@ -324,7 +324,7 @@ def main():
llcp={'on-startup': llcp_startup,
'on-connect': llcp_connected}):
break
- except Exception, e:
+ except Exception as e:
print "clf.connect failed"
global srv