Simplify error handling in mkdir_p()

This commit is contained in:
Berker Peksag
2016-03-05 08:30:31 +02:00
parent ee718066f7
commit 6aafb5654d

View File

@@ -91,9 +91,7 @@ def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc: # Python >2.5
if exc.errno == errno.EEXIST:
pass
else:
if exc.errno != errno.EEXIST:
raise