Accepting request 611145 from Virtualization
- Update lsvmbus interpreter from env(1) to python3(1) (bsc#1093910) OBS-URL: https://build.opensuse.org/request/show/611145 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hyper-v?expand=0&rev=37
This commit is contained in:
commit
c4ce36542f
@ -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
|
Mon Jan 8 10:45:35 UTC 2018 - ohering@suse.de
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
@ -16,7 +16,7 @@ if options.verbose is not None:
|
|||||||
|
|
||||||
vmbus_sys_path = '/sys/bus/vmbus/devices'
|
vmbus_sys_path = '/sys/bus/vmbus/devices'
|
||||||
if not os.path.isdir(vmbus_sys_path):
|
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)
|
exit(-1)
|
||||||
|
|
||||||
vmbus_dev_dict = {
|
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:
|
for d in vmbus_dev_list:
|
||||||
if verbose == 0:
|
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:
|
elif verbose == 1:
|
||||||
print ('VMBUS ID ' + format1) % \
|
print (('VMBUS ID ' + format1) % \
|
||||||
(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping)
|
(d.vmbus_id, d.class_id, d.dev_desc, d.chn_vp_mapping))
|
||||||
else:
|
else:
|
||||||
print ('VMBUS ID ' + format2) % \
|
print (('VMBUS ID ' + format2) % \
|
||||||
(d.vmbus_id, d.class_id, d.dev_desc, \
|
(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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user