ia64/xen-unstable
changeset 19329:728df5693cd2
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@sun.com>
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>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Thu Mar 12 10:59:19 2009 +0000 (2009-03-12) |
parents | 40e8684a34bf |
children | 8401a1f14759 |
files | tools/python/xen/web/SrvDir.py |
line diff
1.1 --- a/tools/python/xen/web/SrvDir.py Thu Mar 12 10:58:47 2009 +0000 1.2 +++ b/tools/python/xen/web/SrvDir.py Thu Mar 12 10:59:19 2009 +0000 1.3 @@ -20,7 +20,7 @@ import types 1.4 from xen.xend import sxp 1.5 from xen.xend import PrettyPrint 1.6 from xen.xend.Args import ArgError 1.7 -from xen.xend.XendError import XendError 1.8 +from xen.xend.XendError import XendError, XendInvalidDomain 1.9 #from xen.xend.XendLogging import log 1.10 1.11 import resource 1.12 @@ -71,6 +71,8 @@ class SrvDir(SrvBase): 1.13 val = self.get(x) 1.14 except XendError, ex: 1.15 return self.noChild(str(ex)) 1.16 + except XendInvalidDomain, ex: 1.17 + return self.noChild(str(ex)) 1.18 if val is None: 1.19 return self.noChild('Not found: ' + str(x)) 1.20 else: