WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] Fix some missing variables in Xend

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix some missing variables in XendDomain caught by pylint.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:09:18 +0000
Delivery-date: Thu, 02 Nov 2006 21:43:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Fix some missing variables in XendDomain caught by pylint., Xen patchbot-unstable <=