From 2846fb4e310c331c502367f13011396335c803f6 Mon Sep 17 00:00:00 2001 From: Jakub Wilk Date: Thu, 20 Apr 2017 09:38:23 +0200 Subject: [PATCH] Remove misplaced flags from re.sub() call (#153) The 4th argument of re.sub() is maximum number of substitutions, not flags. Moreover, re.MULTILINE affects only semantics of ^ and $, so it wouldn't have any effect on this regular expression. --- ocrmypdf/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrmypdf/__main__.py b/ocrmypdf/__main__.py index 855df7cd..09280c0a 100755 --- a/ocrmypdf/__main__.py +++ b/ocrmypdf/__main__.py @@ -420,7 +420,7 @@ def available_cpu_count(): def cleanup_ruffus_error_message(msg): - msg = re.sub(r'\s+', r' ', msg, re.MULTILINE) + msg = re.sub(r'\s+', r' ', msg) msg = re.sub(r"\((.+?)\)", r'\1', msg) msg = msg.strip() return msg