jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/956098 )
Change subject: Wrap DOT-string in curly braces in category_graph.py
......................................................................
Wrap DOT-string in curly braces in category_graph.py
Invalid DOT-string in category_graph.py caused TypeError exception when
running category_graph.py. Wrapped the DOT-string in curly braces in
argument passed to pydot.graph_from_dot_data() so that the DOT-string is
in line with the pydot documentation.
Wrap DOT-string in additional set of curly braces.
I forgot the second set of curly braces in the original commit and am
adding them in this commit. The second braces escape the first set of
braces and resolve "style" in the argument.
Bug: T346007
Change-Id: I635e077240b7d6441d5349edf261ba00a96748e7
---
M scripts/category_graph.py
1 file changed, 22 insertions(+), 1 deletion(-)
Approvals:
Xqt: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/category_graph.py b/scripts/category_graph.py
index fd97b8c..0d875b2 100755
--- a/scripts/category_graph.py
+++ b/scripts/category_graph.py
@@ -90,7 +90,7 @@
f'node [newrank=true shape=plaintext {font}] ' \
f'edge [arrowhead=open labeldistance=3 ' \
f'labelfontcolor="#00000080" {font}] ' + args.style
- self.dot = pydot.graph_from_dot_data(f'digraph {style}')[0]
+ self.dot = pydot.graph_from_dot_data(f'digraph {{{style}}}')[0]
self.dot.set_name(f'"{cat_title}"')
def scan_level(self, cat, level, hue=None) -> str:
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/956098
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I635e077240b7d6441d5349edf261ba00a96748e7
Gerrit-Change-Number: 956098
Gerrit-PatchSet: 4
Gerrit-Owner: Enag2000 <enag2000(a)gmail.com>
Gerrit-Reviewer: D3r1ck01 <dalangi-ctr(a)wikimedia.org>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged