Skip to content

Commit b8aadab

Browse files
committed
For comps try filename before header info, au contraire for instrs
1 parent 85a1525 commit b8aadab

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/Python/mcdoc/mcdoc.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,10 @@ def write_doc_files_or_continue(comp_infos, instr_infos, comp_files, instr_files
925925
for i in range(len(comp_infos)):
926926
try:
927927
p = comp_infos[i]
928-
f = comp_files[i]
928+
try:
929+
f = comp_files[i]
930+
except:
931+
f = comp_infos[i].filepath
929932
doc = CompDocWriter(p)
930933
text = doc.create()
931934
h = pathlib.Path(os.path.splitext(f)[0] + '.html')
@@ -940,7 +943,10 @@ def write_doc_files_or_continue(comp_infos, instr_infos, comp_files, instr_files
940943
for i in range(len(instr_infos)):
941944
try:
942945
p = instr_infos[i]
943-
f = instr_infos[i].filepath
946+
try:
947+
f = instr_infos[i].filepath
948+
except:
949+
f = instr_files[i]
944950
doc = InstrDocWriter(p)
945951
text = doc.create()
946952
h = pathlib.Path(os.path.splitext(f)[0] + '.html')

0 commit comments

Comments
 (0)