jenkins-bot merged this change.
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(-)
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):
To view, visit change 480810. To unsubscribe, or for help writing mail filters, visit settings.