http://www.mediawiki.org/wiki/Special:Code/pywikipedia/9580
Revision: 9580 Author: xqt Date: 2011-10-03 19:05:34 +0000 (Mon, 03 Oct 2011) Log Message: ----------- Do not edit empty pages (should also prevent wrong edits due to bug #3414669 - interwiki.py removes page text)
Modified Paths: -------------- trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py =================================================================== --- trunk/pywikipedia/interwiki.py 2011-10-03 16:27:16 UTC (rev 9579) +++ trunk/pywikipedia/interwiki.py 2011-10-03 19:05:34 UTC (rev 9580) @@ -1740,6 +1740,11 @@ pywikibot.output(u"Not editing %s: page does not exist" % page.aslink(True)) raise SaveError + if page.isEmpty(): + pywikibot.output(u"Not editing %s: page is empty" + % page.aslink(True)) + raise SaveError +
# clone original newPages dictionary, so that we can modify it to the # local page's needs
pywikipedia-svn@lists.wikimedia.org