From 8cea56acebdea351ef273d060c683201f0a8e210 Mon Sep 17 00:00:00 2001 From: Daniel Albert Date: Mon, 2 Jul 2018 20:57:45 +0000 Subject: [PATCH] Fix string concatenation to fix error messages Without using parentheses, the strings are not joined. --- mayan/apps/ocr/backends/pyocr.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mayan/apps/ocr/backends/pyocr.py b/mayan/apps/ocr/backends/pyocr.py index baffdf7d0c..eff1936064 100644 --- a/mayan/apps/ocr/backends/pyocr.py +++ b/mayan/apps/ocr/backends/pyocr.py @@ -48,12 +48,12 @@ class PyOCR(OCRBackendBase): builder=pyocr.builders.TextBuilder() ) except Exception as exception: - error_message = 'Exception calling pyocr with language option: ' - '{}; {}'.format(self.language, exception) + error_message = ('Exception calling pyocr with language option: ' + '{}; {}').format(self.language, exception) if self.language not in self.languages: - error_message = '{}\nThe requested OCR language "{}" is not ' - 'available and needs to be installed.\n'.format( + error_message = ('{}\nThe requested OCR language "{}" is not ' + 'available and needs to be installed.\n').format( error_message, self.language )