Skip to content

Commit

Permalink
fmk - fixing processInputs for Windows machines
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Oct 8, 2021
1 parent f0b986d commit c35df23
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions backend/modules/performUQ/UCSD_UQ/processInputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import stat
import subprocess
import platform

if __name__ == '__main__':

Expand All @@ -14,11 +15,12 @@
runType = inputArgs[3] # either "runningLocal" or "runningRemote"

# Change permission of workflow driver
workflowDriverFile = os.path.join(templateDir, "workflow_driver")
if runType in ['runningLocal']:
os.chmod(workflowDriverFile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IXOTH)
st = os.stat(workflowDriverFile)
os.chmod(workflowDriverFile, st.st_mode | stat.S_IEXEC)
if platform.system() != "Windows":
workflowDriverFile = os.path.join(templateDir, "workflow_driver")
if runType in ['runningLocal']:
os.chmod(workflowDriverFile, stat.S_IXUSR | stat.S_IRUSR | stat.S_IXOTH)
st = os.stat(workflowDriverFile)
os.chmod(workflowDriverFile, st.st_mode | stat.S_IEXEC)

if runType in ["runningLocal"]:
# Get path to python from dakota.json file
Expand Down

0 comments on commit c35df23

Please sign in to comment.