ia64/xen-unstable

changeset 13213:b175c2f19e0a

Format Xen-API error messages nicely.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Thu Dec 28 15:52:31 2006 +0000 (2006-12-28)
parents 91130d1e6006
children 615109616bb6
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Thu Dec 28 16:55:17 2006 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Thu Dec 28 15:52:31 2006 +0000
     1.3 @@ -1780,7 +1780,8 @@ def _run_cmd(cmd, cmd_name, args):
     1.4      except SystemExit, code:
     1.5          return code == 0, code
     1.6      except XenAPI.Failure, exn:
     1.7 -        print >>sys.stderr, str(exn)
     1.8 +        for line in [''] + wrap(str(exn), 80) + ['']:
     1.9 +            print >>sys.stderr, line
    1.10      except xmlrpclib.Fault, ex:
    1.11          if ex.faultCode == XendClient.ERROR_INVALID_DOMAIN:
    1.12              err("Domain '%s' does not exist." % ex.faultString)