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: Correctly catch invalid domain look

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Correctly catch invalid domain lookups
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Mar 2009 04:30:23 -0700
Delivery-date: Thu, 12 Mar 2009 04:31:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236855559 0
# Node ID 728df5693cd299a3eb1fc140c4c68a94f2838d4b
# Parent  40e8684a34bfda0a51d2305fae343c78e0b7a70c
xend: Correctly catch invalid domain lookups

If a client asks about a non-existent domain, report the error back
properly instead of just backtracing within xend.

Signed-off-by: John Levon <john.levon@xxxxxxx>
---
 tools/python/xen/web/SrvDir.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 40e8684a34bf -r 728df5693cd2 tools/python/xen/web/SrvDir.py
--- a/tools/python/xen/web/SrvDir.py    Thu Mar 12 10:58:47 2009 +0000
+++ b/tools/python/xen/web/SrvDir.py    Thu Mar 12 10:59:19 2009 +0000
@@ -20,7 +20,7 @@ from xen.xend import sxp
 from xen.xend import sxp
 from xen.xend import PrettyPrint
 from xen.xend.Args import ArgError
-from xen.xend.XendError import XendError
+from xen.xend.XendError import XendError, XendInvalidDomain
 #from xen.xend.XendLogging import log
 
 import resource
@@ -70,6 +70,8 @@ class SrvDir(SrvBase):
         try:
             val = self.get(x)
         except XendError, ex:
+            return self.noChild(str(ex))
+        except XendInvalidDomain, ex:
             return self.noChild(str(ex))
         if val is None:
             return self.noChild('Not found: ' + str(x))

_______________________________________________
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: Correctly catch invalid domain lookups, Xen patchbot-unstable <=