aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 12:43:32 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-23 12:43:32 +0100
commit83217cebdf3558250d3c02893eec357fab548ccf (patch)
tree32d47eb63e4b56e674057d4f771b40359f8a42bd /tools
parent78cb34992bf7013b47664b062985c22358f6a6ce (diff)
downloadxen-83217cebdf3558250d3c02893eec357fab548ccf.tar.gz
xen-83217cebdf3558250d3c02893eec357fab548ccf.tar.bz2
xen-83217cebdf3558250d3c02893eec357fab548ccf.zip
[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>
Diffstat (limited to 'tools')
-rw-r--r--tools/python/xen/xm/opts.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/python/xen/xm/opts.py b/tools/python/xen/xm/opts.py
index 189875d55e..1eac629aa1 100644
--- a/tools/python/xen/xm/opts.py
+++ b/tools/python/xen/xm/opts.py
@@ -488,6 +488,8 @@ class Opts:
p = os.path.join(x, self.vals.defconfig)
else:
p = self.vals.defconfig
+ if not p.startswith('/'):
+ p = os.path.join(os.path.curdir, p)
if os.path.exists(p):
self.info('Using config file "%s".' % p)
self.load(p, help)
@@ -518,6 +520,10 @@ class Opts:
exec cmd in globs, locs
try:
execfile(defconfig, globs, locs)
+ except SyntaxError,e:
+ raise SyntaxError, \
+ "Errors were found at line %d while processing %s:\n\t%s"\
+ %(e.lineno,defconfig,e.text)
except:
if not help: raise
if help: