Fix domain list build/cleanup code with xend subdirectory.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-09-13 16:57:45 +00:00
1 parent 366ca1710b
commit d0b30dab40
1 file changed
+9 -3
+9 -3
View File
@@ -130,8 +130,11 @@ class XendDomain:
doms = self.xen_domains()
self.dbmap.readDB()
for domdb in self.dbmap.values():
if not domdb.has_key("xend"):
continue
db = domdb.addChild("xend")
try:
domid = int(domdb.id)
domid = int(db.id)
except:
domid = None
# XXX if domid in self.domains, then something went wrong
@@ -139,7 +142,7 @@ class XendDomain:
domdb.delete()
elif domid in doms:
try:
self._new_domain(domdb['uuid'], domdb, doms[domid])
self._new_domain(db.uuid, db, doms[domid])
except Exception, ex:
log.exception("Error recreating domain info: id=%d", domid)
self._delete_domain(domid)
@@ -204,8 +207,11 @@ class XendDomain:
eserver.inject('xend.domain.died', [info.name, info.id])
# XXX this should not be needed
for domdb in self.dbmap.values():
if not domdb.has_key("xend"):
continue
db = domdb.addChild("xend")
try:
domid = int(domdb.id)
domid = int(db.id)
except:
domid = None
if (domid is None) or (domid == id):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.