WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Format Xen-API error messages nicely.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 29 Dec 2006 14:20:18 -0800
Delivery-date: Fri, 29 Dec 2006 14:21:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Format Xen-API error messages nicely., Xen patchbot-unstable <=