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: Ieb1f20cf862a7bcc263d3ce5b0c7c0c578046c5a --- M scripts/maintenance/wikimedia_sites.py 1 file changed, 6 insertions(+), 9 deletions(-)
Approvals: Merlijn van Deen: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/maintenance/wikimedia_sites.py b/scripts/maintenance/wikimedia_sites.py index efd922b..04e4e41 100644 --- a/scripts/maintenance/wikimedia_sites.py +++ b/scripts/maintenance/wikimedia_sites.py @@ -5,7 +5,7 @@ """ # # (C) xqt, 2009-2014 -# (C) Pywikipedia bot team, 2008-2013 +# (C) Pywikibot team, 2008-2014 # # Distributed under the terms of the MIT license. # @@ -99,11 +99,8 @@
if __name__ == '__main__': - try: - fam = [] - for arg in pywikibot.handleArgs(): - if arg in familiesDict.keys() and arg not in fam: - fam.append(arg) - update_family(fam) - finally: - pywikibot.stopme() + fam = [] + for arg in pywikibot.handleArgs(): + if arg in familiesDict.keys() and arg not in fam: + fam.append(arg) + update_family(fam)
pywikibot-commits@lists.wikimedia.org