jenkins-bot has submitted this change and it was merged.
Change subject: unusedfiles raises NoPage for deleted file ......................................................................
unusedfiles raises NoPage for deleted file
Bug: 69133 Change-Id: I76db1f45be98c881547b61f098ef49f715613f30 --- M scripts/unusedfiles.py 1 file changed, 4 insertions(+), 0 deletions(-)
Approvals: Ricordisamoa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/unusedfiles.py b/scripts/unusedfiles.py index 55730f3..75ae002 100644 --- a/scripts/unusedfiles.py +++ b/scripts/unusedfiles.py @@ -96,6 +96,10 @@ generator = pagegenerators.UnusedFilesGenerator() generator = pagegenerators.PreloadingGenerator(generator) for image in generator: + if not image.exists(): + pywikibot.output(u"File '%s' does not exist (see bug 69133)." + % image.title()) + continue if (except_text_translated.encode('utf-8') not in image.getImagePageHtml() and u'http://' not in image.text):