tools/qvm-features: fix handling empty list of features
This commit is contained in:
parent
98edc9779c
commit
0c43329188
@ -70,6 +70,10 @@ def main(args=None):
|
||||
if args.delete:
|
||||
parser.error('--unset requires a feature')
|
||||
|
||||
if not vm.features:
|
||||
# max doesn't like empty list
|
||||
return 0
|
||||
|
||||
width = max(len(feature) for feature in vm.features)
|
||||
for feature in sorted(vm.features):
|
||||
print('{name:{width}s} {value}'.format(
|
||||
|
Loading…
Reference in New Issue
Block a user