jenkins-bot submitted this change.
[IMPR] Use string format style with exception message
Use string format style with AbuseFilterDisallowedError
and InvalidPageError message
Change-Id: I77e6081e3a2716abf55f7a5c5d9537f15355366b
---
M pywikibot/exceptions.py
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pywikibot/exceptions.py b/pywikibot/exceptions.py
index ef76f0f..b7ceeda 100644
--- a/pywikibot/exceptions.py
+++ b/pywikibot/exceptions.py
@@ -473,7 +473,7 @@
.. versionadded:: 6.2
"""
- message = 'Page %s is invalid.'
+ message = 'Page {} is invalid.'
class InvalidTitleError(Error):
@@ -549,8 +549,8 @@
"""Page save failed because the AbuseFilter disallowed it."""
- message = ('Edit to page %(title)s disallowed by the AbuseFilter.\n'
- '%(info)s')
+ message = ('Edit to page {title} disallowed by the AbuseFilter.\n'
+ '{info}')
def __init__(self, page: 'pywikibot.page.Page', info: str,
other: str) -> None:
To view, visit change 736204. To unsubscribe, or for help writing mail filters, visit settings.