Revision: 7971
Author: russblau
Date: 2010-02-26 22:21:43 +0000 (Fri, 26 Feb 2010)
Log Message:
-----------
cache _catinfo even if empty (to avoid repetitive API queries)
Modified Paths:
--------------
branches/rewrite/pywikibot/site.py
Modified: branches/rewrite/pywikibot/site.py
===================================================================
--- branches/rewrite/pywikibot/site.py 2010-02-26 22:20:18 UTC (rev 7970)
+++ branches/rewrite/pywikibot/site.py 2010-02-26 22:21:43 UTC (rev 7971)
@@ -1515,7 +1515,7 @@
self.getcategoryinfo(category)
if not hasattr(category, "_catinfo"):
# a category that exists but has no contents returns no API result
- return {'size':0, 'pages':0, 'files':0,
'subcats':0}
+ category._catinfo = {'size':0, 'pages':0, 'files':0,
'subcats':0}
return category._catinfo
@deprecate_arg("throttle", None)
Show replies by date