jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/762882 )
Change subject: [bugfix] use oldest_file_info.user as uploader in unusedfiles.py ......................................................................
[bugfix] use oldest_file_info.user as uploader in unusedfiles.py
Bug: T301768 Change-Id: I10c315c4994b57339f7d47e6568b49dd2bb76267 --- M scripts/unusedfiles.py 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Meno25: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 601260a..3102dc7 100755 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -117,7 +117,7 @@ self.append_text(image, '\n\n' + self.opt.filetemplate) if self.opt.nouserwarning: return - uploader = image.get_file_history().pop(0)['user'] + uploader = image.oldest_file_info.user user = pywikibot.User(image.site, uploader) usertalkpage = user.getUserTalkPage() template2uploader = self.opt.usertemplate \