jenkins-bot submitted this change.

View Change

Approvals: JJMC89: Looks good to me, approved jenkins-bot: Verified
[bugfix] Solve TypeError debug() missing 1 required positional argument: 'layer'

Bug: T299309
Change-Id: I566217e04749f287359721ee8a9da54b38363312
---
M pywikibot/site/_tokenwallet.py
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pywikibot/site/_tokenwallet.py b/pywikibot/site/_tokenwallet.py
index 271e46e..dd9f292 100644
--- a/pywikibot/site/_tokenwallet.py
+++ b/pywikibot/site/_tokenwallet.py
@@ -1,12 +1,14 @@
"""Objects representing api tokens."""
#
-# (C) Pywikibot team, 2008-2020
+# (C) Pywikibot team, 2008-2022
#
# Distributed under the terms of the MIT license.
#
from pywikibot import debug
from pywikibot.exceptions import Error

+_logger = 'site.tokenwallet'
+

class TokenWallet:

@@ -60,7 +62,8 @@
if self.site.mw_version >= '1.24wmf19' \
and key in {'edit', 'delete', 'protect', 'move', 'block', 'unblock',
'email', 'import', 'options'}:
- debug('Token {!r} was replaced by {!r}'.format(key, 'csrf'))
+ debug(
+ 'Token {!r} was replaced by {!r}'.format(key, 'csrf'), _logger)
key = 'csrf'

try:

To view, visit change 754107. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I566217e04749f287359721ee8a9da54b38363312
Gerrit-Change-Number: 754107
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: Matěj Suchánek <matejsuchanek97@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged