dom0/qvm-ls: show 'n/a' in disk usage for dom0
This commit is contained in:
parent
0c43635806
commit
c0f1d3c53b
@ -174,6 +174,9 @@ def main():
|
|||||||
for vm in vms_to_display:
|
for vm in vms_to_display:
|
||||||
data_row = {}
|
data_row = {}
|
||||||
for f in fields_to_display:
|
for f in fields_to_display:
|
||||||
|
if vm.qid == 0 and (f.startswith('priv-') or f.startswith('root-') or f == 'disk'):
|
||||||
|
data_row[f] = 'n/a'
|
||||||
|
else:
|
||||||
data_row[f] = str(eval(fields[f]["func"]))
|
data_row[f] = str(eval(fields[f]["func"]))
|
||||||
l = len(data_row[f])
|
l = len(data_row[f])
|
||||||
if l > fields[f]["max_width"]:
|
if l > fields[f]["max_width"]:
|
||||||
|
Loading…
Reference in New Issue
Block a user