Skip to content

Commit 76915db

Browse files
Fixed fdoc_sourcelinks: Error opening issues
Ticket: CFE-4570 Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
1 parent 73a3e43 commit 76915db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

generator/_scripts/cfdoc_sourcelinks.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ def addLinkToSource(file_name, config):
110110
break
111111
if line.find("layout: printable") == 0:
112112
return 0
113+
if line.find("published: false") == 0:
114+
return 0
113115

114116
if not html_file:
115117
return 0
@@ -118,7 +120,11 @@ def addLinkToSource(file_name, config):
118120
unexpanded_macro = unexpandedMacroRegex()
119121

120122
error_count = 0
121-
html_file = config["CFE_DIR"] + "/" + html_file
123+
if html_file.endswith("index.html"):
124+
html_file = config["CFE_DIR"] + "/" + html_file
125+
else:
126+
html_file = config["CFE_DIR"] + "/" + html_file + "/index.html"
127+
122128
try:
123129
in_file = open(html_file, "r")
124130
lines = in_file.readlines()

0 commit comments

Comments
 (0)