jenkins-bot has submitted this change and it was merged.
Change subject: remove obsolete pywikibot.stopme() at the end of the script. ......................................................................
remove obsolete pywikibot.stopme() at the end of the script.
In core branch pywikibot.stopme() is called by atexit library. The function is executed upon normal program termination. This patch prohibits executing it twice.
Change-Id: I9171ba44407ec1848c29e5ea69482d83b1e457ff --- M scripts/add_text.py M scripts/archivebot.py M scripts/basic.py M scripts/blockpageschecker.py M scripts/casechecker.py M scripts/catall.py M scripts/category.py M scripts/clean_sandbox.py M scripts/commonscat.py 9 files changed, 17 insertions(+), 42 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/add_text.py b/scripts/add_text.py index 5fce0ae..773c789 100644 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -64,7 +64,7 @@
# # (C) Filnik, 2007-2010 -# (C) Pywikibot team, 2007-2013 +# (C) Pywikibot team, 2007-2014 # # Distributed under the terms of the MIT license. # @@ -365,7 +365,4 @@ create=talkPage)
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/archivebot.py b/scripts/archivebot.py index 6bf326c..c970c5f 100644 --- a/scripts/archivebot.py +++ b/scripts/archivebot.py @@ -65,7 +65,7 @@ """ # # (C) Misza13, 2006-2010 -# (C) xqt, 2009-2012 +# (C) xqt, 2009-2014 # (C) Pywikibot team, 2007-2013 # # Distributed under the terms of the MIT license. @@ -550,7 +550,4 @@ traceback.print_exc()
if __name__ == '__main__': - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/basic.py b/scripts/basic.py index 9f191f2..daee1a3 100755 --- a/scripts/basic.py +++ b/scripts/basic.py @@ -16,7 +16,7 @@ and the bot will only work on that single page. """ # -# (C) Pywikibot team, 2006-2013 +# (C) Pywikibot team, 2006-2014 # # Distributed under the terms of the MIT license. # @@ -176,7 +176,4 @@ pywikibot.showHelp()
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/blockpageschecker.py b/scripts/blockpageschecker.py index 1a55a99..dd9bb9c 100755 --- a/scripts/blockpageschecker.py +++ b/scripts/blockpageschecker.py @@ -57,7 +57,7 @@ # (C) Monobi a.k.a. Wikihermit, 2007 # (C) Filnik, 2007-2011 # (C) NicDumZ, 2008-2009 -# (C) Pywikibot team, 2007-2013 +# (C) Pywikibot team, 2007-2014 # # Distributed under the terms of the MIT license. # @@ -491,7 +491,4 @@
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/casechecker.py b/scripts/casechecker.py index 495575c..5e53ea6 100644 --- a/scripts/casechecker.py +++ b/scripts/casechecker.py @@ -822,8 +822,5 @@
if __name__ == "__main__": - try: - bot = CaseChecker() - bot.Run() - finally: - pywikibot.stopme() + bot = CaseChecker() + bot.Run() diff --git a/scripts/catall.py b/scripts/catall.py index 20d5ded..421cd76 100755 --- a/scripts/catall.py +++ b/scripts/catall.py @@ -110,7 +110,4 @@ pywikibot.output(u'%s is a redirect' % p.title())
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/category.py b/scripts/category.py index f3bfdf8..8a3ab0d 100755 --- a/scripts/category.py +++ b/scripts/category.py @@ -89,7 +89,7 @@ # (C) leogregianin, 2004-2008 # (C) Cyde, 2006-2010 # (C) Anreas J Schwab, 2007 -# (C) xqt, 2009-2013 +# (C) xqt, 2009-2014 # (C) Pywikibot team, 2008-2013 # # Distributed under the terms of the MIT license. @@ -1086,4 +1086,3 @@ pywikibot.error("Fatal error:", exc_info=True) finally: catDB.dump() - pywikibot.stopme() diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py index 12ed851..1efc9b4 100755 --- a/scripts/clean_sandbox.py +++ b/scripts/clean_sandbox.py @@ -32,7 +32,7 @@ # (C) Wikipedian, 2006-2007 # (C) Andre Engels, 2007 # (C) Siebrand Mazeland, 2007 -# (C) xqt, 2009-2013 +# (C) xqt, 2009-2014 # (C) Dr. Trigon, 2012 # (C) Pywikibot team, 2012-2013 # @@ -272,7 +272,4 @@ pywikibot.output('\nQuitting program...')
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main() diff --git a/scripts/commonscat.py b/scripts/commonscat.py index e523656..6112a06 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -55,8 +55,8 @@
# # (C) Multichill, 2008-2009 -# (C) Xqt, 2009-2013 -# (C) Pywikipedia bot team, 2008-2012 +# (C) Xqt, 2009-2014 +# (C) Pywikibot team, 2008-2012 # # Distributed under the terms of the MIT license. # @@ -595,7 +595,4 @@ bot.run()
if __name__ == "__main__": - try: - main() - finally: - pywikibot.stopme() + main()