Revision: 5569 Author: nicdumz Date: 2008-06-15 14:22:51 +0000 (Sun, 15 Jun 2008)
Log Message: ----------- Fixing bug #1988528 [movepages.py generates a false error]
Does anyone know why were we expecting a server_answer (data) == u'' ??
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-06-15 14:14:22 UTC (rev 5568) +++ trunk/pywikipedia/wikipedia.py 2008-06-15 14:22:51 UTC (rev 5569) @@ -2063,7 +2063,7 @@ data = u'' else: response, data = self.site().postForm(address, predata, sysop = sysop) - if data == u'': + if data == u'' or self.site().mediawiki_message('pagemovedsub') in data: if deleteAndMove: output(u'Page %s moved to %s, deleting the existing page' % (self.title(), newtitle)) else: @@ -2085,6 +2085,7 @@ elif not self.exists(): raise NoPage(u'Page move failed: Source page [[%s]] does not exist.' % newtitle) elif Page(self.site(),newtitle).exists(): + #XXX : This might be buggy : if the move was successful, the target pase *has* been created raise PageNotSaved(u'Page move failed: Target page [[%s]] already exists.' % newtitle) else: output(u'Page move failed for unknown reason.')