xend: fix dual destroy
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 25 Jul 2008 12:58:23 +0000 (13:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 25 Jul 2008 12:58:23 +0000 (13:58 +0100)
After changeset 18030 and 18064 were checked in, I found some issues
when creating HVM domains with devices assigned.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/xend/XendDomainInfo.py

index 505200915863b2ce6f47e2671be071fed7709439..82ee45478793c05e9f39b715e839f5351a759ed2 100644 (file)
@@ -2374,6 +2374,9 @@ class XendDomainInfo:
     def destroy(self):
         """Cleanup VM and destroy domain.  Nothrow guarantee."""
 
+        if self.domid is None:
+            return
+
         log.debug("XendDomainInfo.destroy: domid=%s", str(self.domid))
 
         paths = self._prepare_phantom_paths()