Revision: 4608 Author: russblau Date: 2007-11-28 13:49:24 +0000 (Wed, 28 Nov 2007)
Log Message: ----------- Fix bug that was causing help text to print twice when executing redirect.py from the console.
Modified Paths: -------------- trunk/pywikipedia/redirect.py
Modified: trunk/pywikipedia/redirect.py =================================================================== --- trunk/pywikipedia/redirect.py 2007-11-28 09:58:49 UTC (rev 4607) +++ trunk/pywikipedia/redirect.py 2007-11-28 13:49:24 UTC (rev 4608) @@ -344,8 +344,9 @@ bot = RedirectRobot(action, gen, always) bot.run()
-try: - main() -finally: - wikipedia.stopme() +if __name__ == '__main__': + try: + main() + finally: + wikipedia.stopme()