[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Format Xen-API error messages nicely.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1167321151 0
# Node ID b175c2f19e0a6017330b0562c80b04a1611e1016
# Parent  91130d1e60067f26ac19a57289f9bcbbf9580369
Format Xen-API error messages nicely.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 91130d1e6006 -r b175c2f19e0a tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Thu Dec 28 16:55:17 2006 +0000
+++ b/tools/python/xen/xm/main.py       Thu Dec 28 15:52:31 2006 +0000
@@ -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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.