mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
details: Fix processor tab display for some LXC guests
With LXC domain, the 'current' attribute of 'vcpu' element is not always present, but the code is still depending on it.
This commit is contained in:
parent
2b7aa33887
commit
1ac755e7b2
@ -1036,7 +1036,10 @@ class vmmDomain(vmmLibvirtObject):
|
||||
return int(self.get_xmlobj().maxmemory)
|
||||
|
||||
def vcpu_count(self):
|
||||
return int(self.get_xmlobj().curvcpus)
|
||||
guest = self.get_xmlobj()
|
||||
return int(guest.curvcpus or
|
||||
self._startup_vcpus or
|
||||
guest.vcpus)
|
||||
def vcpu_max_count(self):
|
||||
guest = self.get_xmlobj()
|
||||
has_xml_max = (guest.curvcpus != guest.vcpus)
|
||||
|
Loading…
Reference in New Issue
Block a user