ia64/xen-unstable

changeset 12657:2773c39df9a6

Fix xm new -F -- this fix was recently introduced for xm create.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Nov 29 12:16:19 2006 +0000 (2006-11-29)
parents 1b501311c778
children 463bda167715
files tools/python/xen/xm/new.py
line diff
     1.1 --- a/tools/python/xen/xm/new.py	Wed Nov 29 12:15:45 2006 +0000
     1.2 +++ b/tools/python/xen/xm/new.py	Wed Nov 29 12:16:19 2006 +0000
     1.3 @@ -58,6 +58,12 @@ def main(argv):
     1.4      if not opts:
     1.5          return
     1.6  
     1.7 +    if type(config) == str:
     1.8 +        try:
     1.9 +            config = sxp.parse(file(config))[0]
    1.10 +        except IOError, exn:
    1.11 +            raise OptionError("Cannot read file %s: %s" % (config, exn[1]))
    1.12 +
    1.13      if opts.vals.dryrun:
    1.14          PrettyPrint.prettyprint(config)
    1.15      else: