Blame SOURCES/0001-tools-hv-update-lsvmbus-to-be-compatible-with-python.patch

b19ffd
From 1e2d32c6ee12b45823ba3cda0054a4bd843896fc Mon Sep 17 00:00:00 2001
b19ffd
From: Olaf Hering <olaf@aepfle.de>
b19ffd
Date: Tue, 5 Jun 2018 13:37:55 -0700
b19ffd
Subject: [PATCH] tools: hv: update lsvmbus to be compatible with python3
b19ffd
b19ffd
Python3 changed the way how 'print' works.
b19ffd
Adjust the code to a syntax that is understood by python2 and python3.
b19ffd
b19ffd
Signed-off-by: Olaf Hering <olaf@aepfle.de>
b19ffd
Acked-by: Dexuan Cui <decui@microsoft.com>
b19ffd
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
b19ffd
---
b19ffd
 tools/hv/lsvmbus | 12 ++++++------
b19ffd
 1 file changed, 6 insertions(+), 6 deletions(-)
b19ffd
b19ffd
diff --git a/tools/hv/lsvmbus b/tools/hv/lsvmbus
b19ffd
index 353e56768df8..55e7374bade0 100644
b19ffd
--- a/tools/hv/lsvmbus
b19ffd
+++ b/tools/hv/lsvmbus
b19ffd
@@ -17,7 +17,7 @@ if options.verbose is not None:
b19ffd
 
b19ffd
 vmbus_sys_path = '/sys/bus/vmbus/devices'
b19ffd
 if not os.path.isdir(vmbus_sys_path):
b19ffd
-	print "%s doesn't exist: exiting..." % vmbus_sys_path
b19ffd
+	print("%s doesn't exist: exiting..." % vmbus_sys_path)
b19ffd
 	exit(-1)
b19ffd
 
b19ffd
 vmbus_dev_dict = {
b19ffd
@@ -93,11 +93,11 @@ format2 = '%2s: Class_ID = %s - %s\n\tDevice_ID = %s\n\tSysfs path: %s\n%s'
b19ffd
 
b19ffd
 for d in vmbus_dev_list:
b19ffd
 	if verbose == 0:
b19ffd
-		print ('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc)
b19ffd
+		print(('VMBUS ID ' + format0) % (d.vmbus_id, d.dev_desc))
b19ffd
 	elif verbose == 1:
b19ffd
-		print ('VMBUS ID ' + format1) %	\
b19ffd
-			(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)
b19ffd
+		print (('VMBUS ID ' + format1) %	\
b19ffd
+			(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping))
b19ffd
 	else:
b19ffd
-		print ('VMBUS ID ' + format2) % \
b19ffd
+		print (('VMBUS ID ' + format2) % \
b19ffd
 			(d.vmbus_id, d.class_id, d.dev_desc, \
b19ffd
-			d.device_id, d.sysfs_path, d.chn_vp_mapping)
b19ffd
+			d.device_id, d.sysfs_path, d.chn_vp_mapping))
b19ffd
-- 
b19ffd
2.14.4
b19ffd