Commit 80f425e6 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[scripts][execute] Clean run directory parameter handling

parent 2309b0eb
......@@ -194,15 +194,16 @@ def main():
logger.debug("zmq client connected to loop `%s'", loop_addr)
# Check the dir
if not os.path.exists(args["<dir>"]):
run_directory = args["<dir>"]
if not os.path.exists(run_directory):
send_error(
logger, socket, "sys", "Running directory `%s' not found" % args["<dir>"]
logger, socket, "sys", "Running directory `%s' not found" % run_directory
)
close(logger, [socket, db_socket, loop_socket], context)
return 1
# Load the configuration
with open(os.path.join(args["<dir>"], "configuration.json"), "r") as f:
with open(os.path.join(run_directory, "configuration.json"), "r") as f:
cfg = simplejson.load(f)
# Create a new user with less privileges (if necessary)
......@@ -246,7 +247,7 @@ def main():
# Sets up the execution
executor = AlgorithmExecutor(
socket,
args["<dir>"],
run_directory,
cache_root=cache,
db_socket=db_socket,
loop_socket=loop_socket,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment