Xqt has uploaded a new change for review. https://gerrit.wikimedia.org/r/316311
Change subject: [IMPR] remove obsolete exception handling ...................................................................... [IMPR] remove obsolete exception handling - remove obsolete exception handling for userPut() method in create_categories.py which is done by the method itself. Change-Id: I318f7c2b61db47c086dfe5aef101ecb97c699af0 --- M scripts/create_categories.py 1 file changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/11/316311/1 diff --git a/scripts/create_categories.py b/scripts/create_categories.py index e9c5902..0696d9e 100755 --- a/scripts/create_categories.py +++ b/scripts/create_categories.py @@ -35,8 +35,8 @@ __version__ = '$Id$' # # (C) Multichill, 2011 -# (C) xqt, 2011-2014 -# (c) Pywikibot team, 2014 +# (C) xqt, 2011-2016 +# (c) Pywikibot team, 2016 # # Distributed under the terms of the MIT license. # @@ -68,14 +68,9 @@ if not newpage.exists(): pywikibot.output(newpage.title()) - try: - self.userPut(newpage, '', newtext, summary=self.comment) - except pywikibot.EditConflict: - pywikibot.output(u'Skipping %s due to edit conflict' % newpage.title()) - except pywikibot.ServerError: - pywikibot.output(u'Skipping %s due to server error' % newpage.title()) - except pywikibot.PageNotSaved as error: - pywikibot.output(u'Error putting page: %s' % error.args) + self.userPut(newpage, '', newtext, summary=self.comment, + ignore_save_related_errors=True, + ignore_server_errors=True) else: # FIXME: Add overwrite option pywikibot.output(u'%s already exists, skipping' % newpage.title()) -- To view, visit https://gerrit.wikimedia.org/r/316311 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I318f7c2b61db47c086dfe5aef101ecb97c699af0 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Xqt <i...@gno.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits