This patch adds a quick check to 'xm restore' that checks the

existence and readability of the file given.

This fixes the issue detected in xm-tests 03_restore_badparm_neg and
04_restore_badfilename_neg.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-09-27 15:10:38 +01:00
1 parent 9427933f18
commit 0fae7b55e5
1 file changed
+4
+4
View File
@@ -188,6 +188,10 @@ def xm_restore(args):
savefile = os.path.abspath(args[0])
if not os.access(savefile, os.R_OK):
err("xm restore: Unable to read file %s" % savefile)
sys.exit(1)
from xen.xend.XendClient import server
info = server.xend_domain_restore(savefile)
PrettyPrint.prettyprint(info)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.