Skip to content

Commit

Permalink
qvm-template: Tweak machine-readable output format.
Browse files Browse the repository at this point in the history
  • Loading branch information
WillyPillow committed Aug 25, 2020
1 parent 6efd85a commit 2e06e30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/manpages/qvm-template.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Options

::

|{status}|{name}|{evr}|{reponame}|
{status}|{name}|{evr}|{reponame}

Where ``{status}`` can be one of ``installed``, ``available``,
``extra``, or ``upgradable``.
Expand Down Expand Up @@ -307,7 +307,7 @@ Options

::

|{status}|{name}|{epoch}|{version}|{release}|{reponame}|{size}|{buildtime}|{installtime}|{license}|{url}|{summary}|{description}|
{status}|{name}|{epoch}|{version}|{release}|{reponame}|{size}|{buildtime}|{installtime}|{license}|{url}|{summary}|{description}

Where ``{status}`` can be one of ``installed``, ``available``,
``extra``, or ``upgradable``.
Expand Down
3 changes: 1 addition & 2 deletions qubesadmin/tools/qvm_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -1082,9 +1082,8 @@ def append_vm(vm, status):
elif operation == 'list':
tpl_list = list_to_machine_output(tpl_list)
for status, grp in tpl_list.items():
print('|' + status)
for line in grp:
print('|'.join(line.values()) + '|')
print('|'.join([status] + list(line.values())))
elif args.machine_readable_json:
if operation == 'info':
tpl_list = info_to_machine_output(tpl_list, replace_newline=False)
Expand Down

0 comments on commit 2e06e30

Please sign in to comment.