User "Andre Engels" posted a comment on pywikipedia.r9724.
Full URL: http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9724#c25385
Commit summary:
bugfix: bot incorrectly noted edit conflicts on semiprotected pages
Comment:
I had not checked yet, I just found that they were different objects with the
same representation, then applied the fix without checking further. Now I have,
I found that editTime is an int when the get has been called with
change_edit_time=True, a string otherwise.
I don't have write access to SVN from the machine I am now on, but the better
way to solve this bug is:
_getEditPage() has the following lines:
if change_edit_time:
self._editTime = parsetime2stamp(lastRev['timestamp'])
if "starttimestamp" in pageInfo:
self._startTime = parsetime2stamp(pageInfo["starttimestamp"])
This should be changed to:
if change_edit_time:
self._editTime = str(parsetime2stamp(lastRev['timestamp']))
if "starttimestamp" in pageInfo:
self._startTime = str(parsetime2stamp(pageInfo["starttimestamp"]))
Another solution could be to have parsetime2stamp itself return a string
instead of an integer, but there is a third place where that one is used, and I
cannot see directly which object type is needed there.
_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview