Revision: 6174 Author: erwin85 Date: 2008-12-20 19:51:41 +0000 (Sat, 20 Dec 2008)
Log Message: ----------- Set wpEdittime and wpStarttime to now() when MediaWiki returns wpRecreate
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-12-20 19:35:33 UTC (rev 6173) +++ trunk/pywikipedia/wikipedia.py 2008-12-20 19:51:41 UTC (rev 6174) @@ -1534,14 +1534,8 @@ # without any reason! # raise EditConflict(u'Someone deleted the page.') # No raise, simply define these variables and retry: - if self._editTime: - predata['wpEdittime'] = self._editTime - else: - predata['wpEdittime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime()) - if self._startTime: - predata['wpStarttime'] = self._startTime - else: - predata['wpStarttime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime()) + predata['wpEdittime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime()) + predata['wpStarttime'] = time.strftime('%Y%m%d%H%M%S', time.gmtime()) continue if self.site().has_mediawiki_message("viewsource")\ and self.site().mediawiki_message('viewsource') in data:
Revision: 6174 Author: erwin85 Date: 2008-12-20 19:51:41 +0000 (Sat, 20 Dec 2008)
Log Message:
Set wpEdittime and wpStarttime to now() when MediaWiki returns wpRecreate
Are you sure that this doesn't break anything? You must be very careful with such edits, we already had lots of cases where such a change made the bots overwrite other users' edits. So I hope you have properly tested it. Also, please give some explanation why this change was necessary, and what its consequences are.
Daniel
Modified Paths:
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
--- trunk/pywikipedia/wikipedia.py 2008-12-20 19:35:33 UTC (rev 6173) +++ trunk/pywikipedia/wikipedia.py 2008-12-20 19:51:41 UTC (rev 6174) @@ -1534,14 +1534,8 @@ # without any reason! # raise EditConflict(u'Someone deleted the page.') # No raise, simply define these variables and retry:
if self._editTime:
predata['wpEdittime'] = self._editTime
else:
predata['wpEdittime'] = time.strftime('%Y%m%d%H%M%S',
time.gmtime())
if self._startTime:
predata['wpStarttime'] = self._startTime
else:
predata['wpStarttime'] =
time.strftime('%Y%m%d%H%M%S', time.gmtime())
predata['wpEdittime'] = time.strftime('%Y%m%d%H%M%S',
time.gmtime())
predata['wpStarttime'] = time.strftime('%Y%m%d%H%M%S',
time.gmtime()) continue if self.site().has_mediawiki_message("viewsource")\ and self.site().mediawiki_message('viewsource') in data:
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l