Skip to content

Commit

Permalink
fixed makedirs directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
lhhunghimself committed Jan 23, 2024
1 parent 831ac0d commit 6df9de3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion coreutils/DockerClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def start(self,cmds,outputFile=None,schedule=False):
sys.stderr.write('runScheduler.sh {}\n'.format(cmds))
self.process.start('runScheduler.sh',cmds)
else:
os.makedirs(self.logDir)
os.makedirs(self.logDir,exist_ok=True)
self.startLog()
cmds.insert(0,self.baseLogDir)
cmds.insert(0,self.processDir)
Expand Down
2 changes: 1 addition & 1 deletion coreutils/workflowTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def exportWorkflow(
):
tempDir = tempfile.mkdtemp()
projectTitlePath = niceForm(projectTitle, useDash=False)
os.makedirs(tempDir + "/widgets/{}".format(projectTitlePath, useDash=False))
os.makedirs(tempDir + "/widgets/{}".format(projectTitlePath, useDash=False), exist_ok=True)
tempOWS = "{}/{}".format(tempDir, os.path.basename(bwbOWS))
shutil.copyfile(bwbOWS, tempOWS)
doc = minidom.parse(bwbOWS)
Expand Down

0 comments on commit 6df9de3

Please sign in to comment.