vm: stubdom_xid: use canonical method for checking VM state

Don't depend on xid==-1 for not running VM.
This breaks some tests, as xid can be a mock object (not comparable to
int).
这个提交包含在:
Marek Marczykowski-Górecki 2017-05-13 01:03:04 +02:00
父节点 e598735c3b
当前提交 3c7d2289ce
找不到此签名对应的密钥
GPG 密钥 ID: 063938BA42CFA724

查看文件

@ -535,7 +535,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
@qubes.stateless_property
def stubdom_xid(self):
if self.xid < 0:
if not self.is_running():
return -1
if self.app.vmm.xs is None: