[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [XM] Print qualified path to config file on domain creation.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 356520dca6df8504a461228ae76d3ecd86626386
# Parent  babae8ac84b95ff4fbc1cfe4ac27c59ceaba7e38
[XM] Print qualified path to config file on domain creation.
From: Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/opts.py |    6 ++++++
 1 files changed, 6 insertions(+)

diff -r babae8ac84b9 -r 356520dca6df tools/python/xen/xm/opts.py
--- a/tools/python/xen/xm/opts.py       Mon Oct 23 12:28:33 2006 +0100
+++ b/tools/python/xen/xm/opts.py       Mon Oct 23 12:43:32 2006 +0100
@@ -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:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.