Skip to content

Commit

Permalink
[sphinx] don't use os.path.makedirs(exist_ok=True) as it doesn't work…
Browse files Browse the repository at this point in the history
… on python 2
  • Loading branch information
vovkos committed Apr 16, 2020
1 parent 03bf849 commit e08117a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sphinx/doxyrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ def on_config_inited(app, config):
contents = contents.replace('%tab_width%', str(config.doxyrest_tab_width))
src_file.close()

os.makedirs(app.doctreedir, exist_ok=True)
if not os.path.exists(app.doctreedir):
os.makedirs(app.doctreedir)

dst_file = open(docutils_conf_path, 'w')
dst_file.write(contents)
dst_file.close()
Expand Down

0 comments on commit e08117a

Please sign in to comment.