jenkins-bot submitted this change.
category_graph: add encoding
Change-Id: Ifda3512acaff021ce6f47f440d4b8ddd28c3966c
---
M scripts/category_graph.py
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/scripts/category_graph.py b/scripts/category_graph.py
index d757a6d..d871225 100755
--- a/scripts/category_graph.py
+++ b/scripts/category_graph.py
@@ -163,10 +163,10 @@
break
n = self.rev[n][0]
pywikibot.output('Saving results')
- pywikibot.output(self.to + '.dot')
- self.dot.write(self.to + '.dot')
+ pywikibot.output(self.to + '.gv')
+ self.dot.write(self.to + '.gv', encoding='utf-8')
pywikibot.output(self.to + '.svg')
- self.dot.write_svg(self.to + '.svg')
+ self.dot.write_svg(self.to + '.svg', encoding='utf-8')
pywikibot.output(self.to + '.html')
header = ('<head><meta charset="UTF-8"/>'
'<title>' + self.cat.title(with_ns=False)
@@ -181,7 +181,7 @@
'<style> svg { height:100%; width:100%; } </style>\n')
with io.open(self.to + '.html', mode='wb') as o:
o.write(header.encode())
- o.write(self.dot.create('dot', 'svg'))
+ o.write(self.dot.create('dot', 'svg', encoding='utf-8'))
if __name__ == '__main__':
To view, visit change 866796. To unsubscribe, or for help writing mail filters, visit settings.