Skip to content

Commit

Permalink
Make the exception handling for make_dir more strict.
Browse files Browse the repository at this point in the history
  • Loading branch information
allenh1 committed Oct 26, 2017
1 parent bf9cd48 commit 7fadbca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions superflore/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ def info(string):
def make_dir(dirname):
try:
os.makedirs(dirname)
except:
pass
except OSError as e:
if e.errno == errno.EEXIST and os.path.isdir(dirname):
pass
else:
raise e


def get_pkg_version(distro, pkg_name):
Expand Down

0 comments on commit 7fadbca

Please # to comment.