jenkins-bot has submitted this change and it was merged.
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(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
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: merged
Gerrit-Change-Id: I318f7c2b61db47c086dfe5aef101ecb97c699af0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>