[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Make the error reporting back to xm just a little bit less insane, and fix a
# HG changeset patch # User emellor@ewan # Node ID b938c4965a8f1cab34f27d66187a896743057c5d # Parent 00a324b3a2db17545065176a7acf83f45e259ab3 Make the error reporting back to xm just a little bit less insane, and fix a missing import inside blkif. Fix the command parsing for op_device_destroy and op_device_configure -- the device IDs should be strings, to allow the user to specify devices by name as well as number. This is the second half to the fixes for bug #315. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> diff -r 00a324b3a2db -r b938c4965a8f tools/python/xen/web/SrvBase.py --- a/tools/python/xen/web/SrvBase.py Wed Oct 12 12:00:55 2005 +++ b/tools/python/xen/web/SrvBase.py Wed Oct 12 12:13:32 2005 @@ -86,7 +86,7 @@ except Exception, exn: log.exception("Request %s failed.", op) if req.useSxp(): - return ['xend.err', "Exception: " + str(exn)] + return ['xend.err', str(exn)] else: return "<p>%s</p>" % str(exn) diff -r 00a324b3a2db -r b938c4965a8f tools/python/xen/xend/server/SrvDomain.py --- a/tools/python/xen/xend/server/SrvDomain.py Wed Oct 12 12:00:55 2005 +++ b/tools/python/xen/xend/server/SrvDomain.py Wed Oct 12 12:13:32 2005 @@ -146,13 +146,13 @@ def op_device_destroy(self, op, req): return self.call(self.dom.destroyDevice, [['type', 'str'], - ['dev', 'int']], + ['dev', 'str']], req) def op_device_configure(self, op, req): return self.call(self.dom.device_configure, [['config', 'sxpr'], - ['dev', 'int']], + ['dev', 'str']], req) diff -r 00a324b3a2db -r b938c4965a8f tools/python/xen/xend/server/blkif.py --- a/tools/python/xen/xend/server/blkif.py Wed Oct 12 12:00:55 2005 +++ b/tools/python/xen/xend/server/blkif.py Wed Oct 12 12:13:32 2005 @@ -22,6 +22,7 @@ from xen.util import blkif from xen.xend import sxp +from xen.xend.XendError import VmError from xen.xend.server.DevController import DevController diff -r 00a324b3a2db -r b938c4965a8f tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Wed Oct 12 12:00:55 2005 +++ b/tools/python/xen/xm/main.py Wed Oct 12 12:13:32 2005 @@ -169,11 +169,9 @@ if error == "Not found" and dom != None: err("Domain '%s' not found when running 'xm %s'" % (dom, cmd)) sys.exit(1) - elif error == "Exception: Device not connected": - err("Device not connected") + else: + err(error) sys.exit(1) - else: - raise ex ######################################################################### _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |