Commit c2e6f847 authored by Baptiste Jonglez's avatar Baptiste Jonglez

Fix Python2 compatibility when creating tiles dir

parent 59d7b140
......@@ -51,9 +51,9 @@ else:
return os.makedirs(name, mode=mode)
# Emulate exist_ok behaviour
try:
res = os.makedirs(name, mode=mode)
return os.makedirs(name, mode=mode)
except OSError as e:
if e.errno == os.errno.EEXIST:
return res
return
else:
raise
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment