qemu.py: fix is_running() return before first launch()
commitf6cf7f5a227ca0c8cc540d78d4f0f943c51ea8d1
authorAmador Pahim <apahim@redhat.com>
Fri, 1 Sep 2017 11:28:17 +0000 (1 13:28 +0200)
committerEduardo Habkost <ehabkost@redhat.com>
Fri, 15 Sep 2017 23:12:00 +0000 (15 20:12 -0300)
tree711e8943d1b4c265644e0e1c404b2afb1146712b
parent4d9342977a2e8b195609d332fcd64a93a48c158b
qemu.py: fix is_running() return before first launch()

is_running() returns None when called before the first time we
call launch():

    >>> import qemu
    >>> vm = qemu.QEMUMachine('qemu-system-x86_64')
    >>> vm.is_running()
    >>>

It should return False instead. This patch fixes that.

For consistence, this patch removes the parenthesis from the
second clause as it's not really needed.

Signed-off-by: Amador Pahim <apahim@redhat.com>
Message-Id: <20170901112829.2571-2-apahim@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
scripts/qemu.py