[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XEND] Fix some missing variables in XendDomain caught by pylint.



# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 57f59959aa80658dc1a320c6fc279dafc763b9f7
# Parent  808f5aa6dbb017d0e2d5c69705b53f6985aa96c1
[XEND] Fix some missing variables in XendDomain caught by pylint.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomain.py |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff -r 808f5aa6dbb0 -r 57f59959aa80 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Fri Oct 27 16:44:15 2006 +0100
+++ b/tools/python/xen/xend/XendDomain.py       Fri Oct 27 16:45:40 2006 +0100
@@ -528,10 +528,10 @@ class XendDomain:
                 
                 if dom.state == XendDomainInfo.DOM_STATE_RUNNING:
                     shutdownAction = dom.info.get('on_xend_stop', 'ignore')
-                    if shouldShutdown and shutdownAction == 'shutdown':
+                    if shutdownAction == 'shutdown':
                         log.debug('Shutting down domain: %s' % dom.getName())
                         dom.shutdown("poweroff")
-                    elif shouldShutdown and shutdownAction == 'suspend':
+                    elif shutdownAction == 'suspend':
                         chkfile = self._managed_check_point_path(dom.getName())
                         self.domain_save(dom.domid, chkfile)
         finally:
@@ -584,7 +584,7 @@ class XendDomain:
             if not dom:
                 return None
 
-            value = dom.get_device_property(klass, devid, field)
+            value = dom.get_device_property(klass, dev_uuid, field)
             return value
         except ValueError, e:
             pass
@@ -952,15 +952,16 @@ class XendDomain:
     def domain_dump(self, domid, filename, live, crash):
         """Dump domain core."""
 
-        dominfo = self.domain_lookup_by_name_or_id_nr(domid)
+        dominfo = self.domain_lookup_nr(domid)
         if not dominfo:
             raise XendInvalidDomain(str(domid))
 
-        if dominfo.getDomid() == PRIV_DOMAIN:
+        if dominfo.getDomid() == DOM0_ID:
             raise XendError("Cannot dump core for privileged domain %s" % 
domid)
 
         try:
-            log.info("Domain core dump requested for domain %s (%d) live=%d 
crash=%d.",
+            log.info("Domain core dump requested for domain %s (%d) "
+                     "live=%d crash=%d.",
                      dominfo.getName(), dominfo.getDomid(), live, crash)
             return dominfo.dumpCore(filename)
         except Exception, ex:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.