diff --git a/luigi/contrib/lsf.py b/luigi/contrib/lsf.py old mode 100755 new mode 100644 index 44e111b670..ae7a13d747 --- a/luigi/contrib/lsf.py +++ b/luigi/contrib/lsf.py @@ -81,9 +81,9 @@ def track_job(job_id): - "EXIT" based on the LSF documentation """ - cmd = "bjobs -noheader -o stat {}".format(job_id) + cmd = ["bjobs", "-noheader", "-o", "stat", str(job_id)] track_job_proc = subprocess.Popen( - cmd, stdout=subprocess.PIPE, shell=True) + cmd, stdout=subprocess.PIPE, shell=False) status = track_job_proc.communicate()[0].strip('\n') return status