http://www.mediawiki.org/wiki/Special:Code/pywikipedia/10173
Revision: 10173 Author: xqt Date: 2012-05-03 10:54:23 +0000 (Thu, 03 May 2012) Log Message: ----------- q&d-fix. Unfortunatelly we have different timestamp formats on all scripts. It's a mess.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2012-05-03 10:51:13 UTC (rev 10172) +++ trunk/pywikipedia/wikipedia.py 2012-05-03 10:54:23 UTC (rev 10173) @@ -1744,7 +1744,8 @@ # self.get() calls self._getEditPage without this parameter self.get(force=True, change_edit_time=True) newtime = self.editTime() - if str(oldtime) != str(newtime): # page was changed + ### TODO: we have different timestamp formats + if re.sub('\D', '', str(oldtime)) != re.sub('\D', '', str(newtime)): # page was changed raise EditConflict(u'Page has been changed after first read.') self._editrestriction = False # If no comment is given for the change, use the default
pywikipedia-svn@lists.wikimedia.org