]> mj.ucw.cz Git - moe.git/blobdiff - t/moe/batch.py
New task "sum" - dummy for now
[moe.git] / t / moe / batch.py
index 15f3b90a3420d363609f9507e6d927b05e99470e..9c839830fee892bdfb1d3e32951138a17a8741b7 100644 (file)
@@ -114,12 +114,18 @@ def test_in(e):
     if in_type == "file":
        in_name = e["IN_NAME"]
        e.log.verbose("Input file: %s (copied from %s)\n" % (in_name, os.path.join(e["PDIR"], inn)))
-       shutil.copyfile(os.path.join(tdir, inn), os.path.join(boxdir, in_name))
+       try:
+           shutil.copyfile(os.path.join(tdir, inn), os.path.join(boxdir, in_name))
+       except IOError:
+           raise moe.MoeError, "Input file not found"
        if not is_interactive:
            sandbox_opts += " -i/dev/null"
     elif in_type == "stdio":
        e.log.verbose("Input file: <stdin> (copied from %s)\n" % os.path.join(e["PDIR"], inn))
-       shutil.copyfile(os.path.join(tdir, inn), os.path.join(boxdir, ".stdin"))
+       try:
+           shutil.copyfile(os.path.join(tdir, inn), os.path.join(boxdir, ".stdin"))
+       except IOError:
+           raise moe.MoeError, "Input file not found"
        sandbox_opts += " -i.stdin"
     elif in_type == "none":
        e.log.verbose("Input file: <none>\n")