tools/qvm-run: fix error reporting on qvm-run -n on halted qube
Fixes QubesOS/qubes-issues#4476
This commit is contained in:
parent
d34b1bfc4f
commit
4b00ef7ec7
@ -479,7 +479,7 @@ class TC_00_qvm_run(qubesadmin.tests.QubesTestCase):
|
|||||||
ret = qubesadmin.tools.qvm_run.main(
|
ret = qubesadmin.tools.qvm_run.main(
|
||||||
['--no-gui', '--no-autostart', 'test-vm3', 'command'],
|
['--no-gui', '--no-autostart', 'test-vm3', 'command'],
|
||||||
app=self.app)
|
app=self.app)
|
||||||
self.assertEqual(ret, 0)
|
self.assertEqual(ret, 1)
|
||||||
self.assertEqual(self.app.service_calls, [])
|
self.assertEqual(self.app.service_calls, [])
|
||||||
self.assertAllCalled()
|
self.assertAllCalled()
|
||||||
|
|
||||||
|
@ -207,6 +207,10 @@ def main(args=None, app=None):
|
|||||||
procs = []
|
procs = []
|
||||||
for vm in domains:
|
for vm in domains:
|
||||||
if not args.autostart and not vm.is_running():
|
if not args.autostart and not vm.is_running():
|
||||||
|
if verbose > 0:
|
||||||
|
print_no_color('Qube \'{}\' not started'.format(vm.name),
|
||||||
|
file=sys.stderr, color=args.color_stderr)
|
||||||
|
retcode = max(retcode, 1)
|
||||||
continue
|
continue
|
||||||
try:
|
try:
|
||||||
if verbose > 0:
|
if verbose > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user