direct-io.hg

changeset 14456:a6d888593117

Tidy the error message from getDomains when using the Xen-API and no domain
is found.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Mar 20 16:55:29 2007 +0000 (2007-03-20)
parents bea7ff5ebd60
children 25bb1e7d236b
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Tue Mar 20 16:52:33 2007 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Tue Mar 20 16:55:29 2007 +0000
     1.3 @@ -710,7 +710,9 @@ def getDomains(domain_names, state, full
     1.4              if len(doms) > 0:
     1.5                  return doms
     1.6              else:
     1.7 -                print "Error: no domains named '%s'" % domain_names
     1.8 +                print "Error: no domain%s named %s" % \
     1.9 +                      (len(domain_names) > 1 and 's' or '',
    1.10 +                       ', '.join(domain_names))
    1.11                  sys.exit(-1)
    1.12          else:
    1.13              return doms_sxp