From d810f03df5d7f192332ba81984ff93a13254c1584a4f2cf115f379f707727093 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Tue, 22 May 2018 06:57:58 +0000 Subject: [PATCH] - Update lsvmbus interpreter from env(1) to python3(1) (bsc#1093910) OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=128 --- hyper-v.changes | 5 +++++ hyper-v.lsvmbus.py | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/hyper-v.changes b/hyper-v.changes index bf16ed0..0c980b6 100644 --- a/hyper-v.changes +++ b/hyper-v.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 22 06:56:57 UTC 2018 - ohering@suse.de + +- Update lsvmbus interpreter from env(1) to python3(1) (bsc#1093910) + ------------------------------------------------------------------- Mon Jan 8 10:45:35 UTC 2018 - ohering@suse.de diff --git a/hyper-v.lsvmbus.py b/hyper-v.lsvmbus.py index 6e2df99..9307c85 100644 --- a/hyper-v.lsvmbus.py +++ b/hyper-v.lsvmbus.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python3 import os from optparse import OptionParser @@ -16,7 +16,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 = { @@ -92,11 +92,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))