Revision: 7386 Author: xqt Date: 2009-10-07 16:13:51 +0000 (Wed, 07 Oct 2009)
Log Message: ----------- do not change the source in "always"-mode of the target does not exist (this would only become an additional broken redirect) #2872953
Modified Paths: -------------- trunk/pywikipedia/redirect.py
Modified: trunk/pywikipedia/redirect.py =================================================================== --- trunk/pywikipedia/redirect.py 2009-10-07 16:09:48 UTC (rev 7385) +++ trunk/pywikipedia/redirect.py 2009-10-07 16:13:51 UTC (rev 7386) @@ -641,9 +641,15 @@ % redir.aslink()) break else: - wikipedia.output( - u"Warning: Redirect target %s doesn't exist." - % newRedir.aslink()) + if self.always: + wikipedia.output( + u"Skipping: Redirect target %s doesn't exist." + % newRedir.aslink()) + break # skip if automatic + else: + wikipedia.output( + u"Warning: Redirect target %s doesn't exist." + % newRedir.aslink()) except wikipedia.ServerError: wikipedia.output(u'Skipping: Server Error') break