Merge remote-tracking branch 'qubesos/pr/40'

* qubesos/pr/40:
  Disable spinner if --raw-data
  Fix qvm-ls --raw-data
This commit is contained in:
Marek Marczykowski-Górecki 2017-12-05 22:22:30 +01:00
commit bd9016a2db
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -571,14 +571,14 @@ def main(args=None, app=None):
if col.upper() not in Column.columns: if col.upper() not in Column.columns:
PropertyColumn(col.lower()) PropertyColumn(col.lower())
if args.spinner: if args.spinner and not args.raw_data:
# we need Enterprise Edition™, since it's the only one that detects TTY # we need Enterprise Edition™, since it's the only one that detects TTY
# and uses dots if we are redirected somewhere else # and uses dots if we are redirected somewhere else
spinner = qubesadmin.spinner.QubesSpinnerEnterpriseEdition(sys.stderr) spinner = qubesadmin.spinner.QubesSpinnerEnterpriseEdition(sys.stderr)
else: else:
spinner = qubesadmin.spinner.DummySpinner(sys.stderr) spinner = qubesadmin.spinner.DummySpinner(sys.stderr)
table = Table(args.app, columns, spinner) table = Table(args.app, columns, spinner, args.raw_data)
table.write_table(sys.stdout) table.write_table(sys.stdout)
return 0 return 0