dom0/qvm-ls: show 'n/a' in disk usage for dom0
This commit is contained in:
父節點
0c43635806
當前提交
c0f1d3c53b
@ -174,7 +174,10 @@ 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:
|
||||||
data_row[f] = str(eval(fields[f]["func"]))
|
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"]))
|
||||||
l = len(data_row[f])
|
l = len(data_row[f])
|
||||||
if l > fields[f]["max_width"]:
|
if l > fields[f]["max_width"]:
|
||||||
fields[f]["max_width"] = l
|
fields[f]["max_width"] = l
|
||||||
|
載入中…
新增問題並參考
Block a user