Revision: 4258 Author: wikipedian Date: 2007-09-12 13:27:56 +0000 (Wed, 12 Sep 2007)
Log Message: ----------- Page.move() give error message when target page already exists.
Modified Paths: -------------- trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2007-09-12 13:24:33 UTC (rev 4257) +++ trunk/pywikipedia/wikipedia.py 2007-09-12 13:27:56 UTC (rev 4258) @@ -1797,8 +1797,10 @@ if self.site().mediawiki_message('pagemovedsub') in data: output(u'Page %s moved to %s' % (self.title(), newtitle)) return True + elif self.site().mediawiki_message('articleexists') in data: + output(u'Page moved failed: Target page [[%s]] already exists.' % newtitle) else: - output(u'Page move failed.') + output(u'Page move failed for unknown reason.') try: ibegin = data.index('<!-- start content -->') + 22 iend = data.index('<!-- end content -->')