http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11594
Revision: 11594 Author: amir Date: 2013-05-30 07:21:02 +0000 (Thu, 30 May 2013) Log Message: ----------- A simple correction
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2013-05-26 17:21:17 UTC (rev 11593) +++ trunk/pywikipedia/wikipedia.py 2013-05-30 07:21:02 UTC (rev 11594) @@ -4493,10 +4493,9 @@ pass claims = self.get()['claims'] theclaim = [] - if value: - for claim in claims: - if claim['m'][1] == propertyID and (int(claim['m'][3][u'numeric-id'])==value or (not value)): - theclaim.append(claim['g']) + for claim in claims: + if claim['m'][1] == propertyID and (int(claim['m'][3][u'numeric-id'])==value or (not value)): + theclaim.append(claim['g']) if not theclaim: raise RuntimeError("The claim %s hasn't been used in the item" % propertyID) params = {