WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XM] Print qualified path to config file

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XM] Print qualified path to config file on domain creation.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Oct 2006 13:10:17 +0000
Delivery-date: Mon, 23 Oct 2006 06:11:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XM] Print qualified path to config file on domain creation., Xen patchbot-unstable <=