jenkins-bot has submitted this change and it was merged.
Change subject: (bug 66012) Reorder inheritance of Error class
......................................................................
(bug 66012) Reorder inheritance of Error class
- UnicodeMixin must be the first object Error class is derived from
- keep lines < 80 chars
Change-Id: I37790365f4224bf83cf4a261ce751c405f3535cb
---
M pywikibot/exceptions.py
1 file changed, 7 insertions(+), 3 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index d9e869a..17296a2 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -16,8 +16,9 @@
# will be needed in the rewrite.
-class Error(Exception, UnicodeMixin):
+class Error(UnicodeMixin, Exception):
"""Wikipedia error"""
+ # NOTE: UnicodeMixin must be the first object Error class is derived from.
def __init__(self, arg):
self.unicode = arg
@@ -102,9 +103,12 @@
class SpamfilterError(PageNotSaved):
- """Saving the page has failed because the MediaWiki spam filter
detected a blacklisted URL."""
+ """Saving the page has failed because the MediaWiki spam filter
detected a
+ blacklisted URL.
+ """
def __init__(self, arg):
- super(SpamfilterError, self).__init__(u'MediaWiki spam filter has been
triggered')
+ super(SpamfilterError, self).__init__(
+ u'MediaWiki spam filter has been triggered')
self.url = arg
self.args = arg,
--
To view, visit
https://gerrit.wikimedia.org/r/136719
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I37790365f4224bf83cf4a261ce751c405f3535cb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Russell Blau <russblau(a)imapmail.org>
Gerrit-Reviewer: jenkins-bot <>