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")