Revision: 8199 Author: russblau Date: 2010-05-19 19:14:22 +0000 (Wed, 19 May 2010)
Log Message: ----------- Fix bug #3003310 - bug accessing 'availableOptions' dict in Bot() class
Modified Paths: -------------- branches/rewrite/pywikibot/bot.py
Modified: branches/rewrite/pywikibot/bot.py =================================================================== --- branches/rewrite/pywikibot/bot.py 2010-05-19 19:10:12 UTC (rev 8198) +++ branches/rewrite/pywikibot/bot.py 2010-05-19 19:14:22 UTC (rev 8199) @@ -588,7 +588,7 @@ # contains the options overriden from defaults self.options = {}
- validOptions = set(Bot.availableOptions) + validOptions = set(self.availableOptions) receivedOptions = set(kwargs)
for opt in receivedOptions & validOptions: @@ -604,7 +604,7 @@ @param option: key defined in Bot.availableOptions """ try: - return self.options.get(option, Bot.availableOptions[option]) + return self.options.get(option, self.availableOptions[option]) except KeyError: raise pywikibot.Error(u'%s is not a valid bot option.' % option)
pywikipedia-svn@lists.wikimedia.org