ia64/xen-unstable

changeset 17139:bfd87849ccda

Fix xm save command's #params check.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Feb 27 13:19:42 2008 +0000 (2008-02-27)
parents b58180cf8ab8
children 5e6e1fce3300
files tools/python/xen/xm/main.py
line diff
     1.1 --- a/tools/python/xen/xm/main.py	Wed Feb 27 13:17:49 2008 +0000
     1.2 +++ b/tools/python/xen/xm/main.py	Wed Feb 27 13:19:42 2008 +0000
     1.3 @@ -699,9 +699,6 @@ def xm_save(args):
     1.4          err(opterr)
     1.5          sys.exit(1)
     1.6  
     1.7 -    dom = params[0]
     1.8 -    savefile = params[1]
     1.9 -
    1.10      checkpoint = False
    1.11      for (k, v) in options:
    1.12          if k in ['-c', '--checkpoint']:
    1.13 @@ -710,9 +707,9 @@ def xm_save(args):
    1.14      if len(params) != 2:
    1.15          err("Wrong number of parameters")
    1.16          usage('save')
    1.17 -        sys.exit(1)
    1.18  
    1.19 -    savefile = os.path.abspath(savefile)
    1.20 +    dom = params[0]
    1.21 +    savefile = os.path.abspath(params[1])
    1.22  
    1.23      if not os.access(os.path.dirname(savefile), os.W_OK):
    1.24          err("xm save: Unable to create file %s" % savefile)