populate hostinfo earlier in tick function so it isn't accessed uninitialized.

This commit is contained in:
Cole Robinson 2008-10-06 13:21:06 -04:00
parent 0e0f4b8da0
commit 1401dff4e2

View File

@ -869,6 +869,8 @@ class vmmConnection(gobject.GObject):
if self.state != self.STATE_ACTIVE:
return
self.hostinfo = self.vmm.getInfo()
# Poll for new virtual network objects
(startNets, stopNets, newNets,
oldNets, self.nets) = self._update_nets()
@ -911,10 +913,6 @@ class vmmConnection(gobject.GObject):
# Finally, we sample each domain
now = time()
try:
self.hostinfo = self.vmm.getInfo()
except:
logging.warn("Unable to get host information")
updateVMs = self.vms
if noStatsUpdate: