Skip to content

Commit af17f3e

Browse files
committed
Devhelp: Add XML declaration in fix_devhelp-links script
1 parent d3011d6 commit af17f3e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fix_devhelp-links.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
target = '404'
4646
el.set('link', target)
4747

48-
out_f = open(out_fn, 'w', encoding='utf-8')
49-
out_f.write(e.tostring(root, encoding='unicode', pretty_print=True))
48+
out_f = open(out_fn, 'wb')
49+
out_f.write(e.tostring(root, encoding='utf-8', pretty_print=True,
50+
xml_declaration=True))
5051
out_f.close()
5152

0 commit comments

Comments
 (0)