1
0

tools/qvm-prefs: fix printing None value

Don't print None value as 'None' string, but as empty one (same as at
API level). Otherwise it is indistinguishable from VM named 'None', or
same string property value.
Este cometimento está contido em:
Marek Marczykowski-Górecki 2018-03-02 02:41:47 +01:00
ascendente 4a9b57f91f
cometimento 2459b8108b
Não foi encontrada uma chave conhecida para esta assinatura, na base de dados
ID da chave GPG: 063938BA42CFA724

Ver ficheiro

@ -126,7 +126,9 @@ def process_actions(parser, args, target):
return 0
try:
print(str(getattr(target, args.property)))
value = getattr(target, args.property)
if value is not None:
print(str(value))
except AttributeError:
parser.error('no such property: {!r}'.format(args.property))