John Levon
2009-Mar-12 01:42 UTC
[Xen-devel] [PATCH] Correctly catch invalid domain lookups
# HG changeset patch # User John Levon <john.levon@sun.com> # Date 1236822149 25200 # Node ID ce97fa7ee861ff3c68468715431ce2b117b5cbee # Parent b0afe999365ef60cc0de3dc910b52503326b5d79 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@sun.com> diff --git a/tools/python/xen/web/SrvDir.py b/tools/python/xen/web/SrvDir.py --- a/tools/python/xen/web/SrvDir.py +++ b/tools/python/xen/web/SrvDir.py @@ -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-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel