Revision: 4257 Author: wikipedian Date: 2007-09-12 13:24:33 +0000 (Wed, 12 Sep 2007)
Log Message: ----------- if moving failed, don't ask to delete the page.
Modified Paths: -------------- trunk/pywikipedia/movepages.py
Modified: trunk/pywikipedia/movepages.py =================================================================== --- trunk/pywikipedia/movepages.py 2007-09-12 13:22:35 UTC (rev 4256) +++ trunk/pywikipedia/movepages.py 2007-09-12 13:24:33 UTC (rev 4257) @@ -76,10 +76,10 @@ try: msg = wikipedia.translate(wikipedia.getSite(), summary) wikipedia.output(u'Moving page %s to [[%s]]' % (page.aslink(), newPageTitle)) - page.move(newPageTitle, msg, throttle=True) - if delete: - deletemsg = wikipedia.translate(wikipedia.getSite(), deletesummary) - page.delete(deletemsg) + if page.move(newPageTitle, msg, throttle=True): + if delete: + deletemsg = wikipedia.translate(wikipedia.getSite(), deletesummary) + page.delete(deletemsg) except wikipedia.NoPage: wikipedia.output(u'Page %s does not exist!' % page.title()) except wikipedia.IsRedirectPage: