|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Catch IOError when using local configurat
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 29bfe8852dce2e7ff79cf1e907d8317fafd4a60c
# Parent e793dad2114d678b9ce8ebd36145f205943bf1cb
Catch IOError when using local configuration files, to give better diagnostics.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
tools/python/xen/xm/create.py | 3 +++
1 files changed, 3 insertions(+)
diff -r e793dad2114d -r 29bfe8852dce tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Mon Nov 06 11:03:04 2006 +0000
+++ b/tools/python/xen/xm/create.py Mon Nov 06 11:36:38 2006 +0000
@@ -1200,7 +1200,10 @@ def main(argv):
return
if type(config) == str:
+ try:
config = sxp.parse(file(config))[0]
+ except IOError, exn:
+ raise OptionError("Cannot read file %s: %s" % (config, exn[1]))
if opts.vals.dryrun:
PrettyPrint.prettyprint(config)
_______________________________________________
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] Catch IOError when using local configuration files, to give better diagnostics.,
Xen patchbot-unstable <=
|
|
|
|
|