domain: Fix inactive XML building to not constantly reparse running VMs :/

This commit is contained in:
Cole Robinson 2010-12-09 14:12:20 -05:00
parent 5c45358adc
commit 35b7eae06d
1 changed files with 2 additions and 1 deletions

View File

@ -1110,8 +1110,9 @@ class vmmDomain(vmmDomainBase):
def _get_guest(self, inactive=False, refresh_if_necc=True):
xml = self._get_domain_xml(inactive, refresh_if_necc)
get_inactive = inactive
if self.is_active() or inactive:
if self.is_active() and get_inactive:
# We don't cache guest for 'inactive' XML while guest is running,
# so just return it
return self._build_guest(xml)