qubes: Minor fixes

Fix mock TestApp object and argument parsing in qvm-run.
This commit is contained in:
Wojtek Porczyk 2016-05-05 16:58:43 +02:00
parent c76790fbde
commit e3aae7bc17
2 changed files with 5 additions and 2 deletions

View File

@ -38,9 +38,12 @@ class TestHost(object):
class TestApp(qubes.tests.TestEmitter):
labels = {1: qubes.Label(1, '0xcc0000', 'red')}
get_label = qubes.Qubes.get_label
check_updates_vm = False
def get_label(self, label):
# pylint: disable=unused-argument
return self.labels[1]
def __init__(self):
super(TestApp, self).__init__()
self.vmm = TestVMM()

View File

@ -86,7 +86,7 @@ def main(args=None):
if len(args.vm) > 1 and args.passio:
parser.error('--passio cannot be used when more than 1 qube is chosen')
if args.localcmd and not passio.passio:
if args.localcmd and not args.passio:
parser.error('--localcmd have no effect without --pass-io')
if args.color_output and not args.filter_esc:
parser.error('--color-output must be used with --filter-escape-chars')