[Pywikipedia-svn] SVN: [7259] branches/rewrite/pywikibot/data/api.py
nicdumz at svn.wikimedia.org
nicdumz at svn.wikimedia.org
Thu Sep 17 11:24:33 UTC 2009
Revision: 7259
Author: nicdumz
Date: 2009-09-17 11:24:33 +0000 (Thu, 17 Sep 2009)
Log Message:
-----------
adding warning to explain what's happening when throttled on login
Modified Paths:
--------------
branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py
===================================================================
--- branches/rewrite/pywikibot/data/api.py 2009-09-17 11:22:48 UTC (rev 7258)
+++ branches/rewrite/pywikibot/data/api.py 2009-09-17 11:24:33 UTC (rev 7259)
@@ -672,6 +672,9 @@
if hasattr(self, '_waituntil'):
if datetime.now() < self._waituntil:
diff = self._waituntil - datetime.now()
+ pywikibot.output(u"Too many tries, waiting %s seconds before retrying."
+ % diff.seconds,
+ level=pywikibot.WARNING)
time.sleep(diff.seconds)
login_request = Request(site=self.site,
action="login",
More information about the Pywikipedia-svn
mailing list