jenkins-bot merged this change.
[bugfix] templatesWithParams() gives a Page object with first tuple item
Bug: T186459
Change-Id: I9ff7f13403d63982b1e39d8539a25f5498129e2e
---
M scripts/imagecopy_self.py
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index dcbc8f1..6ed5e7f 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -438,15 +438,14 @@
for key, value in informationFields[imagepage.site.lang].items():
contents[value] = u''
- templates = imagepage.templatesWithParams()
information = informationTemplate[imagepage.site.lang]
fields = informationFields[imagepage.site.lang]
- for (template, params) in templates:
- if template == information:
+ for template, params in imagepage.templatesWithParams():
+ if template.title() == information:
for param in params:
# Split at =
- (field, sep, value) = param.partition(u'=')
+ field, sep, value = param.partition('=')
# To lowercase, remove underscores and strip of spaces
field = field.lower().replace(u'_', u' ').strip()
key = fields.get(field)
To view, visit change 408069. To unsubscribe, visit settings.