Skip to content

Commit

Permalink
fix CentOS-PaaS-SIG#411 using os.makedirs instead of os.mkdir
Browse files Browse the repository at this point in the history
  • Loading branch information
herlo committed Nov 21, 2017
1 parent 4be8e62 commit fba97ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion linchpin/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,13 @@ def setup_rundb(self):
rundb_conn_dir = os.path.dirname(rundb_conn_int)

if not os.path.exists(rundb_conn_dir):
os.mkdir(rundb_conn_dir)
try:
os.makedirs(rundb_conn_dir)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
else:
raise


self.set_evar('rundb_type', rundb_type)
Expand Down

0 comments on commit fba97ea

Please sign in to comment.