jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/480810 )
Change subject: proofreadpage_tests.py: add error text to Exception ......................................................................
proofreadpage_tests.py: add error text to Exception
Add also error text to raised Exception in case of errors during page.ocr() call. Main purpose it to facilitate investigations when tests fail.
Bug: T212076 Change-Id: I1c4a4da38b9f6b4f4ec0bdb90bc1e6712eb61630 --- M pywikibot/proofreadpage.py 1 file changed, 2 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/proofreadpage.py b/pywikibot/proofreadpage.py index 5432d70..a075e31 100644 --- a/pywikibot/proofreadpage.py +++ b/pywikibot/proofreadpage.py @@ -722,7 +722,8 @@ if not error: return text else: - raise ValueError('%s: not possible to perform OCR.' % self) + raise ValueError( + '{0}: not possible to perform OCR. {1}'.format(self, text))
class PurgeRequest(Request):