Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't ignore failure to create directory #1795

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/docs/show-help-files/build-dummy-ini-files.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# Copyright 2023 Jeffrey M. Squyres. All rights reserved.
#
# Copyright (c) 2023 Nanook Consulting. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
Expand All @@ -10,15 +11,15 @@

# Trivial script to scrape section names from source .rst files and
# generate dummy show_help-style text files. We only use this script
# a) if the show_help files are not availabale (i.e., in a git clone),
# a) if the show_help files are not available (i.e., in a git clone),
# and b) if Sphinx is not available.
#
# We generate these show_help files (as opposed to generating a run
# time error when the show_help file is unavailable) just so that it's
# 100% obvious that you're not getting proper help files because you
# did not have Sphinx available.

# Intentially use a minimal set of Python modules (to decrease any
# Intentionally use a minimal set of Python modules (to decrease any
# needed dependencies).

import re
Expand Down Expand Up @@ -67,7 +68,9 @@
try:
os.makedirs(full_outdir, exists_ok=True)
except Exception:
pass
# cannot create the directory, so just leave it alone
# we did our best, they'll just get a runtime error
return

# Write the output file
with open(outfile, 'w') as fp:
Expand Down