mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
Fix xm save command's #params check.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
This commit is contained in:
1 parent
f8b0360575
commit
28617ff2d0
1 file changed
+2
-5
@@ -699,9 +699,6 @@ def xm_save(args):
|
||||
err(opterr)
|
||||
sys.exit(1)
|
||||
|
||||
dom = params[0]
|
||||
savefile = params[1]
|
||||
|
||||
checkpoint = False
|
||||
for (k, v) in options:
|
||||
if k in ['-c', '--checkpoint']:
|
||||
@@ -710,9 +707,9 @@ def xm_save(args):
|
||||
if len(params) != 2:
|
||||
err("Wrong number of parameters")
|
||||
usage('save')
|
||||
sys.exit(1)
|
||||
|
||||
savefile = os.path.abspath(savefile)
|
||||
dom = params[0]
|
||||
savefile = os.path.abspath(params[1])
|
||||
|
||||
if not os.access(os.path.dirname(savefile), os.W_OK):
|
||||
err("xm save: Unable to create file %s" % savefile)
|
||||
|
||||