Skip to content

Commit

Permalink
Merge b689a70 into f1ef2ac
Browse files Browse the repository at this point in the history
  • Loading branch information
wkcn committed Aug 4, 2020
2 parents f1ef2ac + b689a70 commit 6f10abf
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mobula/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def makedirs(name, mode=511, exist_ok=False):
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.'''
if exist_ok and os.path.exists(name):
return
os.makedirs(name, mode)
try:
os.makedirs(name, mode)
except FileExistsError:
if not exist_ok:
raise

0 comments on commit 6f10abf

Please sign in to comment.