Commit d1b6b762 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

make sure log_dir is directory is a directory

parent 43de8af2
Pipeline #14603 canceled with stages
......@@ -11,7 +11,7 @@ from __future__ import print_function
from .manager import JobManager
from .setshell import environ
from .models import add_job, Job
from .tools import logger, qsub, qstat, qdel, make_shell
from .tools import logger, qsub, qstat, qdel, make_shell, makedirs_safe
import os, sys
......@@ -58,6 +58,10 @@ class JobManagerSGE(JobManager):
dependent_jobs = self.get_jobs(dependencies)
deps = sorted(list(set([ for j in dependent_jobs])))
# make sure log directory is created and is a directory
assert os.path.isdir(job.log_dir), 'Please make sure --log-dir either does not exist or is a directory.'
# generate call to the wrapper script
command = make_shell(python, [jman, '-d%s' % ('v'*verbosity), self._database, 'run-job'])
q_array = "%d-%d:%d" % array if array else None
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment