[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Fix xm save command's #params check.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1204118382 0
# Node ID bfd87849ccda6db8bd7b336b5230237683af96ee
# Parent  b58180cf8ab8c69def4129f7152f136daf5e1596
Fix xm save command's #params check.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff -r b58180cf8ab8 -r bfd87849ccda tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Wed Feb 27 13:17:49 2008 +0000
+++ b/tools/python/xen/xm/main.py       Wed Feb 27 13:19:42 2008 +0000
@@ -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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.