jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/736322 )
Change subject: Drop the other attribute for AbuseFilterDisallowedError ......................................................................
Drop the other attribute for AbuseFilterDisallowedError
Bug: T294822 Change-Id: Iee242bdddd6cc2897db1acf79ef256427a3026d4 --- M pywikibot/exceptions.py M pywikibot/site/_apisite.py 2 files changed, 2 insertions(+), 8 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py index ef76f0f..dc7cde2 100644 --- a/pywikibot/exceptions.py +++ b/pywikibot/exceptions.py @@ -552,11 +552,9 @@ message = ('Edit to page %(title)s disallowed by the AbuseFilter.\n' '%(info)s')
- def __init__(self, page: 'pywikibot.page.Page', info: str, - other: str) -> None: + def __init__(self, page: 'pywikibot.page.Page', info: str) -> None: """Initializer.""" self.info = info - self.other = other super().__init__(page)
diff --git a/pywikibot/site/_apisite.py b/pywikibot/site/_apisite.py index 67ea3ed..4d11d71 100644 --- a/pywikibot/site/_apisite.py +++ b/pywikibot/site/_apisite.py @@ -1641,11 +1641,7 @@ exception.format_map(errdata) ) from None if issubclass(exception, AbuseFilterDisallowedError): - errdata = { - 'info': err.info, - 'other': err.other, - } - raise exception(page, **errdata) from None + raise exception(page, info=err.info) from None if issubclass(exception, SpamblacklistError): urls = ', '.join(err.other[err.code]['matches']) raise exception(page, url=urls) from None