Skip to content

Commit

Permalink
Do not re-raise the exception if the one that we are checking
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Oct 16, 2018
1 parent 846c7e2 commit 812b666
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions readthedocs/core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ def safe_makedirs(directory_name):
try:
os.makedirs(directory_name)
except OSError as e:
if e.errno == errno.EEXIST:
pass
raise
if e.errno != errno.EEXIST: # 17, FileExistsError
raise


def safe_unlink(path):
Expand Down

0 comments on commit 812b666

Please sign in to comment.