[XEND] Handle permission denied when calling xc.domain_getinfo
authorAlastair Tse <atse@xensource.com>
Fri, 3 Nov 2006 10:41:20 +0000 (10:41 +0000)
committerAlastair Tse <atse@xensource.com>
Fri, 3 Nov 2006 10:41:20 +0000 (10:41 +0000)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/XendDomain.py
tools/xm-test/ramdisk/skel/etc/init.d/rcS [changed mode: 0644->0755]

index 34f5ab0558199c8a2c33faf1f75c9c72c72564f2..2015ca7c4b08ec047ae27d35b56a36b9e8027a54 100644 (file)
@@ -328,7 +328,11 @@ class XendDomain:
         @rtype: list of dicts
         @return: A list of dicts representing the running domains.
         """
-        return xc.domain_getinfo()
+        try:
+            return xc.domain_getinfo()
+        except RuntimeError, e:
+            log.exception("Unable to get domain information.")
+            return {}
 
     def _setDom0CPUCount(self):
         """Sets the number of VCPUs dom0 has. Retreived from the
old mode 100644 (file)
new mode 100755 (executable)