http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11520
Revision: 11520 Author: russblau Date: 2013-05-09 19:24:17 +0000 (Thu, 09 May 2013) Log Message: ----------- Make max_retries and retry_wait defaults configurable by user.
Modified Paths: -------------- branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py =================================================================== --- branches/rewrite/pywikibot/data/api.py 2013-05-09 18:38:53 UTC (rev 11519) +++ branches/rewrite/pywikibot/data/api.py 2013-05-09 19:24:17 UTC (rev 11520) @@ -121,8 +121,8 @@ except KeyError: self.site = pywikibot.Site() self.mime = kwargs.pop("mime", False) - self.max_retries = kwargs.pop("max_retries", 25) - self.retry_wait = kwargs.pop("retry_wait", 5) + self.max_retries = kwargs.pop("max_retries", pywikibot.config.max_retries) + self.retry_wait = kwargs.pop("retry_wait", pywikibot.config.retry_wait) self.params = {} if "action" not in kwargs: raise ValueError("'action' specification missing from Request.")