ia64/xen-unstable

changeset 12196:0471272a5de2

[XM] Print qualified path to config file on domain creation.
From: Glauber de Oliveira Costa <gcosta@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Oct 23 12:43:32 2006 +0100 (2006-10-23)
parents 505cd4708946
children f61dcd518cd6
files tools/python/xen/xm/opts.py
line diff
     1.1 --- a/tools/python/xen/xm/opts.py	Sat Oct 28 18:08:43 2006 +0100
     1.2 +++ b/tools/python/xen/xm/opts.py	Mon Oct 23 12:43:32 2006 +0100
     1.3 @@ -488,6 +488,8 @@ class Opts:
     1.4                  p = os.path.join(x, self.vals.defconfig)
     1.5              else:
     1.6                  p = self.vals.defconfig
     1.7 +            if not p.startswith('/'):
     1.8 +                p = os.path.join(os.path.curdir, p)
     1.9              if os.path.exists(p):
    1.10                  self.info('Using config file "%s".' % p)
    1.11                  self.load(p, help)
    1.12 @@ -518,6 +520,10 @@ class Opts:
    1.13          exec cmd in globs, locs
    1.14          try:
    1.15              execfile(defconfig, globs, locs)
    1.16 +        except SyntaxError,e:
    1.17 +                raise SyntaxError, \
    1.18 +                "Errors were found at line %d while processing %s:\n\t%s"\
    1.19 +                %(e.lineno,defconfig,e.text)
    1.20          except:
    1.21              if not help: raise
    1.22          if help: