aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/examples/dbus-listen-preq.py
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2019-01-24 07:45:42 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-26 10:37:25 (GMT)
commit89896c0008d1e055790572190d02c24ae1721a76 (patch)
treedc6bc51984d101b49d0ac1092d04c4bf166481a9 /wpa_supplicant/examples/dbus-listen-preq.py
parentbab493b90486b61c8feb2bc56d1769a08a75ab2a (diff)
downloadhostap-89896c0008d1e055790572190d02c24ae1721a76.zip
hostap-89896c0008d1e055790572190d02c24ae1721a76.tar.gz
hostap-89896c0008d1e055790572190d02c24ae1721a76.tar.bz2
tests: Use python3 compatible print statement
This patch is made by using 2to3 command. $ find . -name *.py | xargs 2to3 -f print -w -n Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/examples/dbus-listen-preq.py')
-rwxr-xr-xwpa_supplicant/examples/dbus-listen-preq.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/wpa_supplicant/examples/dbus-listen-preq.py b/wpa_supplicant/examples/dbus-listen-preq.py
index 5ac9859..337519f 100755
--- a/wpa_supplicant/examples/dbus-listen-preq.py
+++ b/wpa_supplicant/examples/dbus-listen-preq.py
@@ -1,5 +1,6 @@
#!/usr/bin/python
+from __future__ import print_function
import dbus
import sys
import time
@@ -12,21 +13,24 @@ WPAS_DBUS_OPATH = "/fi/w1/wpa_supplicant1"
WPAS_DBUS_INTERFACES_INTERFACE = "fi.w1.wpa_supplicant1.Interface"
def usage():
- print "Usage: %s <ifname>" % sys.argv[0]
- print "Press Ctrl-C to stop"
+ print("Usage: %s <ifname>" % sys.argv[0])
+ print("Press Ctrl-C to stop")
def ProbeRequest(args):
if 'addr' in args:
- print '%.2x:%.2x:%.2x:%.2x:%.2x:%.2x' % tuple(args['addr']),
+ print('%.2x:%.2x:%.2x:%.2x:%.2x:%.2x' % tuple(args['addr']),
+ end=' ')
if 'dst' in args:
- print '-> %.2x:%.2x:%.2x:%.2x:%.2x:%.2x' % tuple(args['dst']),
+ print('-> %.2x:%.2x:%.2x:%.2x:%.2x:%.2x' % tuple(args['dst']),
+ end=' ')
if 'bssid' in args:
- print '(bssid %.2x:%.2x:%.2x:%.2x:%.2x:%.2x)' % tuple(args['dst']),
+ print('(bssid %.2x:%.2x:%.2x:%.2x:%.2x:%.2x)' % tuple(args['dst']),
+ end=' ')
if 'signal' in args:
- print 'signal:%d' % args['signal'],
+ print('signal:%d' % args['signal'], end=' ')
if 'ies' in args:
- print 'have IEs (%d bytes)' % len(args['ies']),
- print ''
+ print('have IEs (%d bytes)' % len(args['ies']), end=' ')
+ print('')
if __name__ == "__main__":
global bus