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

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