jenkins-bot has submitted this change and it was merged.
Change subject: commoncat.py: align with LogEntry structure in core ......................................................................
commoncat.py: align with LogEntry structure in core
When porting from compat to core, the compat structure was not changed. A tuple was expected instead of a LogEntry object.
Slightly improved output message in checkCommonscatLink().
Bug: T86433 Change-Id: If7d166f81076da7394f2acd243fcf13d0e68df8e --- M scripts/commonscat.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: Ricordisamoa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commonscat.py b/scripts/commonscat.py index 13031a5..d276360 100755 --- a/scripts/commonscat.py +++ b/scripts/commonscat.py @@ -473,8 +473,8 @@ pywikibot.output(u'Commons category does not exist. Examining deletion log...') logpages = commonsSite.logevents(logtype='delete', page=commonsPage) for logitem in logpages: - logitem = next(logpages) - (logpage, loguser, logtimestamp, logcomment) = logitem + loguser = logitem.user() + logcomment = logitem.comment() # Some logic to extract the target page. regex = u'moved to [[:?Category:(?P<newcat1>[^|}]+)(|[^}]+)?]]|Robot: Changing Category:(.+) to Category:(?P<newcat2>.+)' m = re.search(regex, logcomment, flags=re.I) @@ -485,9 +485,9 @@ return self.checkCommonscatLink(m.group('newcat2')) else: pywikibot.output( - u'getCommonscat: Deleted by %s. Couldn't find ' + u'getCommonscat: %s deleted by %s. Couldn't find ' u'move target in "%s"' - % (loguser, logcomment)) + % (commonsPage, loguser, logcomment)) return u'' return u'' elif commonsPage.isRedirectPage():
pywikibot-commits@lists.wikimedia.org