Skip to content

Commit 8146e76

Browse files
author
Alasdair Allan
authored
Merge pull request #3551 from raspberrypi/doxupgradebug
Add fallback to handle new doxygen helper files
2 parents f5952b3 + 2b36126 commit 8146e76

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

scripts/transform_doxygen_html.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,12 @@ def parse_individual_file(html_path, html_file, complete_json_mappings, updated_
742742
title_text = get_document_title(root, html_file)
743743
# get only the relevant content
744744
contents = root.find(".//div[@class='contents']")
745-
# prep and write the adoc
746-
final_output = stringify(contents)
747-
adoc = make_adoc(final_output, title_text, html_file)
745+
if contents is not None:
746+
# prep and write the adoc
747+
final_output = stringify(contents)
748+
adoc = make_adoc(final_output, title_text, html_file)
749+
else:
750+
adoc = None
748751
except Exception as e:
749752
exc_type, exc_obj, exc_tb = sys.exc_info()
750753
print("ERROR: ", e, exc_tb.tb_lineno)
@@ -778,8 +781,11 @@ def handler(html_path, output_path, header_path, output_json):
778781
adoc, h_json = parse_individual_file(html_path, html_file, complete_json_mappings, updated_links, h_json)
779782
# write the final adoc file
780783
adoc_path = re.sub(".html$", ".adoc", this_output_path)
781-
write_output(adoc_path, adoc)
782-
print("Generated " + adoc_path)
784+
if adoc is not None:
785+
write_output(adoc_path, adoc)
786+
print("Generated " + adoc_path)
787+
else:
788+
print("--------- SKIPPED " + adoc_path)
783789

784790
toc_list = []
785791
toc_list = parse_toc(h_json, toc_list)

0 commit comments

Comments
 (0)