X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=t%2Fmoe%2Fbatch.py;h=9c839830fee892bdfb1d3e32951138a17a8741b7;hb=55dcaa6d8671d02d792919dc47e4758df6ae5471;hp=15f3b90a3420d363609f9507e6d927b05e99470e;hpb=1b4230380f90897a6f2cd3d28b6631f916d37587;p=moe.git diff --git a/t/moe/batch.py b/t/moe/batch.py index 15f3b90..9c83983 100644 --- a/t/moe/batch.py +++ b/t/moe/batch.py @@ -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: (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: \n")