From 36399e1d9500a60e5bc49ddf4ebd2848ee3d2ae9 Mon Sep 17 00:00:00 2001 From: Olivier Commowick Date: Wed, 13 Nov 2019 15:43:28 +0100 Subject: [PATCH] Use python3 chmod codes --- atlasing/anatomical/animaBuildAnatomicalAtlas.py | 4 ++-- .../animaBuildAnatomicalICAtlas.py | 6 +++--- atlasing/dti/animaBuildDTIAtlas.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atlasing/anatomical/animaBuildAnatomicalAtlas.py b/atlasing/anatomical/animaBuildAnatomicalAtlas.py index cf011fd..2d06312 100755 --- a/atlasing/anatomical/animaBuildAnatomicalAtlas.py +++ b/atlasing/anatomical/animaBuildAnatomicalAtlas.py @@ -105,7 +105,7 @@ myfile.write("\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub"] if previousMergeId == 0: @@ -139,7 +139,7 @@ myfile.write("\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub","-n","merge-" + str(k),"-S",os.getcwd() + "/mergeRun_" + str(k)] diff --git a/atlasing/anatomical_iterative_centroid/animaBuildAnatomicalICAtlas.py b/atlasing/anatomical_iterative_centroid/animaBuildAnatomicalICAtlas.py index 6c47f72..d86f85b 100755 --- a/atlasing/anatomical_iterative_centroid/animaBuildAnatomicalICAtlas.py +++ b/atlasing/anatomical_iterative_centroid/animaBuildAnatomicalICAtlas.py @@ -87,7 +87,7 @@ myfile.write("\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub"] if previousMergeId == 0: @@ -121,7 +121,7 @@ " -a $OAR_ARRAY_INDEX \n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub","-n","bch-" + str(k),"-S",os.getcwd() + "/bchRun_" + str(k), "-a", str(previousRegId)] @@ -147,7 +147,7 @@ " -c " + str(args.num_cores) + "\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub"] for jobId in jobsIds: diff --git a/atlasing/dti/animaBuildDTIAtlas.py b/atlasing/dti/animaBuildDTIAtlas.py index aee3731..e3d4117 100755 --- a/atlasing/dti/animaBuildDTIAtlas.py +++ b/atlasing/dti/animaBuildDTIAtlas.py @@ -105,7 +105,7 @@ myfile.write("\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub"] if previousMergeId == 0: @@ -139,7 +139,7 @@ myfile.write("\n") myfile.close() - os.chmod(fileName, 0755) + os.chmod(fileName, stat.S_IRWXU) oarRunCommand = ["oarsub","-n","merge-" + str(k),"-S",os.getcwd() + "/mergeRun_" + str(k)]