[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Protect self.domid from being empty
# HG changeset patch # User Wim Colgate <wim@xxxxxxxxxxxxx> # Date 1171484312 28800 # Node ID 82f66bc01da2cb14062c0651a63dbf7286cfd1e7 # Parent f8030a56981185361c523c8261b639a711ee064b Protect self.domid from being empty --- tools/python/xen/xend/XendDomainInfo.py | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff -r f8030a569811 -r 82f66bc01da2 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Feb 14 19:17:41 2007 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Feb 14 12:18:32 2007 -0800 @@ -1569,16 +1569,17 @@ class XendDomainInfo: # get associated devices to destroy # build list of phantom devices to be removed after normal devices plist = [] - from xen.xend.xenstore.xstransact import xstransact - t = xstransact("%s/device/vbd" % GetDomainPath(self.domid)) - for dev in t.list(): - backend_phantom_vbd = xstransact.Read("%s/device/vbd/%s/phantom_vbd" \ - % (self.dompath, dev)) - if backend_phantom_vbd is not None: - frontend_phantom_vbd = xstransact.Read("%s/frontend" \ - % backend_phantom_vbd) - plist.append(backend_phantom_vbd) - plist.append(frontend_phantom_vbd) + if self.domid is not None: + from xen.xend.xenstore.xstransact import xstransact + t = xstransact("%s/device/vbd" % GetDomainPath(self.domid)) + for dev in t.list(): + backend_phantom_vbd = xstransact.Read("%s/device/vbd/%s/phantom_vbd" \ + % (self.dompath, dev)) + if backend_phantom_vbd is not None: + frontend_phantom_vbd = xstransact.Read("%s/frontend" \ + % backend_phantom_vbd) + plist.append(backend_phantom_vbd) + plist.append(frontend_phantom_vbd) return plist def _cleanup_phantom_devs(self, plist): _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |