Revision: 5169 Author: btongminh Date: 2008-03-29 15:30:54 +0000 (Sat, 29 Mar 2008)
Log Message: ----------- Work around PHP's stupid weak array typing
Modified Paths: -------------- trunk/pywikipedia/commonsdelinker/checkusage.py
Modified: trunk/pywikipedia/commonsdelinker/checkusage.py =================================================================== --- trunk/pywikipedia/commonsdelinker/checkusage.py 2008-03-29 12:01:02 UTC (rev 5168) +++ trunk/pywikipedia/commonsdelinker/checkusage.py 2008-03-29 15:30:54 UTC (rev 5169) @@ -349,7 +349,8 @@ if '-1' not in res['query']['pages'] and shared: return - usages = res['query'].get('imageusage', {}) + usages = res['query'].get('imageusage') + if not usages: return for usage in usages.itervalues(): title = usage['title'].replace(' ', '_')