Only poll storage if conn is storage capable.

This commit is contained in:
Cole Robinson 2008-09-10 15:02:49 -04:00
parent 11bc1d3951
commit b77e94646a

View File

@ -150,6 +150,7 @@ class vmmConnection(gobject.GObject):
self.state = self.STATE_DISCONNECTED
self.vmm = None
self.storage_capable = None
# Connection Storage pools: UUID -> vmmStoragePool
self.pools = {}
@ -696,6 +697,12 @@ class vmmConnection(gobject.GObject):
newActivePoolNames = []
newInactivePoolNames = []
if self.storage_capable == None:
self.storage_capable = virtinst.util.is_storage_capable(self.vmm)
if not self.storage_capable:
return (stopPools, startPools, origPools, newPools, currentPools)
try:
newActivePoolNames = self.vmm.listStoragePools()
except: