ia64/xen-unstable

changeset 12785:56d93b6ea9ea

Tidy error message.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Mon Dec 04 10:27:23 2006 +0000 (2006-12-04)
parents 4e3a7d82917c
children 59f438d2739b
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Dec 04 10:24:54 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Dec 04 10:27:23 2006 +0000
     1.3 @@ -1709,8 +1709,10 @@ class XendDomainInfo:
     1.4  
     1.5          dom =  XendDomain.instance().domain_lookup_nr(name)
     1.6          if dom and dom.info['uuid'] != self.info['uuid']:
     1.7 -            raise VmError("VM name '%s' already exists as domain %s" %
     1.8 -                          (name, str(dom.domid)))
     1.9 +            raise VmError("VM name '%s' already exists%s" %
    1.10 +                          (name,
    1.11 +                           dom.domid is not None and
    1.12 +                           ("as domain %s" % str(dom.domid)) or ""))
    1.13          
    1.14  
    1.15      def update(self, info = None, refresh = True):