From b12b82b7bc0f1e63d32dcf1d20991ac68a31be9a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Nov 2016 14:31:04 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/__main__.py') diff --git a/src/__main__.py b/src/__main__.py index e0f718b..b961629 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -305,7 +305,7 @@ def signal_SIGUSR1(signum, frame): # Decode it, assume it is in UTF-8, and append # an line ending in case the the last line is # not empty, which would give us an exception. - code = code.decode('utf8', 'error') + '\n' + code = code.decode('utf8', 'strict') + '\n' # Compile the script, code = compile(code, config_file, 'exec') # and run it, with it have the same @@ -719,7 +719,7 @@ else: # Decode configurion script file and add a line break # at the end to ensure that the last line is empty. # If it is not, we will get errors. - code = code.decode('utf-8', 'error') + '\n' + code = code.decode('utf-8', 'strict') + '\n' # Compile the configuration script, code = compile(code, config_file, 'exec') # and run it, with it have the same -- cgit v1.2.3-70-g09d2