r11777 pywikipedia - Code Review archive

Repository:pywikipedia
Revision:r11776‎ | r11777 | r11778 >
Date:06:58, 21 July 2013
Author:legoktm
Status:new
Tags:
Comment:
Fix editAliases function, patch by Pyfisch
Modified paths:
  • /branches/rewrite/pywikibot/page.py (modified) (history)

Diff [purge]

Index: branches/rewrite/pywikibot/page.py
@@ -2262,7 +2262,6 @@
22632263 del self._link._title
22642264 return Page(self).title(**kwargs)
22652265
2266 -
22672266 def __defined_by(self, singular=False):
22682267 """
22692268 returns the parameters needed by the API to identify an item.
@@ -2436,6 +2435,8 @@
24372436 value should be a list of strings.
24382437 """
24392438 aliases = self.__normalizeLanguages(aliases)
 2439+ for (key, strings) in aliases.items():
 2440+ aliases[key] = [{'language': key, 'value': i} for i in strings]
24402441 data = {'aliases': aliases}
24412442 self.editEntity(data, **kwargs)
24422443