diff --git a/python/lsf_post_touch.py b/python/lsf_post_touch.py index 47cc259be..ec0e1b563 100755 --- a/python/lsf_post_touch.py +++ b/python/lsf_post_touch.py @@ -1,10 +1,10 @@ import sys import os -status = sys.argv[1] directories = list() +status = os.getenv("LSB_JOBEXIT_STAT") -for j in range(2,len(sys.argv)) : +for j in range(1,len(sys.argv)) : directories.append(sys.argv[j]) -if ( status == "0" ): +if ( status == "0" or status == 0): os.system("touch "+" ".join(directories))