Prefer human readable output in qvm-prefs and qubes-prefs tools
This commit is contained in:
parent
68ed50c97d
commit
5375dce90d
@ -335,6 +335,8 @@ class Label(object):
|
||||
element.text = self.name
|
||||
return element
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def __repr__(self):
|
||||
return '{}({!r}, {!r}, {!r})'.format(
|
||||
|
@ -72,10 +72,10 @@ def main(args=None):
|
||||
continue
|
||||
|
||||
if args.app.property_is_default(prop):
|
||||
print('{name:{width}s} D {value!r}'.format(
|
||||
print('{name:{width}s} D {value!s}'.format(
|
||||
name=prop.__name__, width=width, value=value))
|
||||
else:
|
||||
print('{name:{width}s} - {value!r}'.format(
|
||||
print('{name:{width}s} - {value!s}'.format(
|
||||
name=prop.__name__, width=width, value=value))
|
||||
|
||||
return 0
|
||||
|
@ -75,10 +75,10 @@ def main(args=None):
|
||||
continue
|
||||
|
||||
if args.vm.property_is_default(prop):
|
||||
print('{name:{width}s} D {value!r}'.format(
|
||||
print('{name:{width}s} D {value!s}'.format(
|
||||
name=prop.__name__, width=width, value=value))
|
||||
else:
|
||||
print('{name:{width}s} - {value!r}'.format(
|
||||
print('{name:{width}s} - {value!s}'.format(
|
||||
name=prop.__name__, width=width, value=value))
|
||||
|
||||
return 0
|
||||
|
@ -290,6 +290,9 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
|
||||
# properties not loaded from XML, calculated at run-time
|
||||
#
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
# VMM-related
|
||||
|
||||
@qubes.tools.qvm_ls.column(width=3)
|
||||
|
Loading…
Reference in New Issue
Block a user