Revision: 5986 Author: filnik Date: 2008-10-17 19:55:32 +0000 (Fri, 17 Oct 2008)
Log Message: ----------- A little change, nothing really meaningfull
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-10-17 17:54:33 UTC (rev 5985) +++ trunk/pywikipedia/wikipedia.py 2008-10-17 19:55:32 UTC (rev 5986) @@ -886,7 +886,7 @@ return True
def pageAPInfo(self): - """Return True if page exists on the wiki, + """Return the last revid if page exists on the wiki, Raise IsRedirectPage if it's a redirect Raise NoPage if the page doesn't exist
@@ -903,7 +903,8 @@ useAPI = True, encodeTitle = False) pageid = data['query']['pages'].keys()[0] if data['query']['pages'][pageid].keys()[0] == 'lastrevid': - return True + return data['query']['pages'][pageid]['lastrevid'] # if ok, + # return the last revid elif data['query']['pages'][pageid].keys()[0] == 'redirect': raise IsRedirectPage else:
pywikipedia-l@lists.wikimedia.org