diff options
author | Olaf Hering | 2018-06-05 22:37:55 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-07-03 13:02:33 +0200 |
commit | 8a99c920092f444cf9f1d737ae76527102886d8e (patch) | |
tree | 6c02256ffd680e0cf462c420396042ee0106c163 /tools/hv | |
parent | Drivers: hv: vmbus: Remove x86 MSR refs in arch independent code (diff) | |
download | kernel-qcow2-linux-8a99c920092f444cf9f1d737ae76527102886d8e.tar.gz kernel-qcow2-linux-8a99c920092f444cf9f1d737ae76527102886d8e.tar.xz kernel-qcow2-linux-8a99c920092f444cf9f1d737ae76527102886d8e.zip |
tools: hv: update lsvmbus to be compatible with python3
Python3 changed the way how 'print' works.
Adjust the code to a syntax that is understood by python2 and python3.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/hv')
-rw-r--r-- | tools/hv/lsvmbus | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus index 353e56768df8..55e7374bade0 100644 --- a/tools/hv/lsvmbus +++ b/tools/hv/lsvmbus @@ -17,7 +17,7 @@ if options.verbose is not None: vmbus_sys_path = '/sys/bus/vmbus/devices' if not os.path.isdir(vmbus_sys_path): - print "%s doesn't exist: exiting..." % vmbus_sys_path + print("%s doesn't exist: exiting..." % vmbus_sys_path) exit(-1) vmbus_dev_dict = { @@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID = %s\n\tSysfs path: %s\n%s' for d in vmbus_dev_list: if verbose == 0: - print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc) + print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)) elif verbose == 1: - print ('VMBUS ID ' + format1) % \ - (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping) + print (('VMBUS ID ' + format1) % \ + (d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)) else: - print ('VMBUS ID ' + format2) % \ + print (('VMBUS ID ' + format2) % \ (d.vmbus_id, d.class_id, d.dev_desc, \ - d.device_id, d.sysfs_path, d.chn_vp_mapping) + d.device_id, d.sysfs_path, d.chn_vp_mapping)) |