Skip to content

Commit

Permalink
Build: check if the YAML file exists before trying to open it
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Mar 16, 2023
1 parent 0f89186 commit 48de597
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions readthedocs/doc_builder/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,10 @@ def store_readthedocs_build_yaml(self):
"readthedocs-build.yaml",
)

if not os.path.exists(yaml_path):
log.debug("Build output YAML file (readtehdocs-build.yaml) does not exist.")
return

try:
with open(yaml_path, "r") as f:
data = yaml.safe_load(f)
Expand Down

0 comments on commit 48de597

Please sign in to comment.