mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
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>
This commit is contained in:
1 parent
4696ce5d87
commit
7865c25877
1 file changed
+3
-1
@@ -20,7 +20,7 @@ import types
|
||||
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
|
||||
@@ -71,6 +71,8 @@ class SrvDir(SrvBase):
|
||||
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))
|
||||
else:
|
||||
|
||||