qubes/tools: accept properties with '-'
'-' is invalid character in python identifier, so all the properties have '_'. But in previous versions qvm-* tools accepted names with '-', so lets not break this. QubesOS/qubes-issues#2412
This commit is contained in:
parent
880566a387
commit
cc440c62f6
@ -87,6 +87,8 @@ def main(args=None):
|
||||
name=prop.__name__, width=width, value=value))
|
||||
|
||||
return 0
|
||||
else:
|
||||
args.property = args.property.replace('-', '_')
|
||||
|
||||
|
||||
if args.value is not None:
|
||||
|
@ -91,6 +91,8 @@ def main(args=None):
|
||||
name=prop.__name__, width=width, value=value))
|
||||
|
||||
return 0
|
||||
else:
|
||||
args.property = args.property.replace('-', '_')
|
||||
|
||||
if args.property not in [prop.__name__
|
||||
for prop in args.domain.property_list()]:
|
||||
|
Loading…
Reference in New Issue
Block a user