jenkins-bot has submitted this change and it was merged.
Change subject: Don't choke on 'removed' labels. ......................................................................
Don't choke on 'removed' labels.
A label will have 'removed' if the serializer recieved bad input like an empty string, so we should just skip that label
Bug: 54767 Change-Id: Ibf4645edfaf25a7ed9afa56484e924bd855f24ed --- M pywikibot/page.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py index 84c88cc..b1f931a 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2418,7 +2418,8 @@ self.labels = {} if 'labels' in self._content: for lang in self._content['labels']: - self.labels[lang] = self._content['labels'][lang]['value'] + if not 'removed' in self._content['labels'][lang]: # Bug 54767 + self.labels[lang] = self._content['labels'][lang]['value']
#descriptions self.descriptions = {}
pywikibot-commits@lists.wikimedia.org