mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Format Xen-API error messages nicely.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
1 parent
d9c6b3982f
commit
a80a083a0e
1 file changed
+2
-1
@@ -1780,7 +1780,8 @@ def _run_cmd(cmd, cmd_name, args):
|
||||
except SystemExit, code:
|
||||
return code == 0, code
|
||||
except XenAPI.Failure, exn:
|
||||
print >>sys.stderr, str(exn)
|
||||
for line in [''] + wrap(str(exn), 80) + ['']:
|
||||
print >>sys.stderr, line
|
||||
except xmlrpclib.Fault, ex:
|
||||
if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN:
|
||||
err("Domain '%s' does not exist." % ex.faultString)
|
||||
|
||||