projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ad5dad
)
Catch IOError when using local configuration files, to give better diagnostics.
author
Ewan Mellor
<ewan@xensource.com>
Mon, 6 Nov 2006 11:36:38 +0000
(11:36 +0000)
committer
Ewan Mellor
<ewan@xensource.com>
Mon, 6 Nov 2006 11:36:38 +0000
(11:36 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xm/create.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xm/create.py
b/tools/python/xen/xm/create.py
index 1bb5171eef3a62a95417c818c96f4d3f77a8f547..d94356d5c55e630649b436673564025d94405738 100644
(file)
--- a/
tools/python/xen/xm/create.py
+++ b/
tools/python/xen/xm/create.py
@@
-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)