diff options
author | Mattias Andrée <maandree@kth.se> | 2016-11-25 14:33:13 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-11-25 14:33:13 +0100 |
commit | de228ed2cd127c3fb79cec6f37d609b9f687728b (patch) | |
tree | 480da678ad07190a28253d0a0e23bc448b797eba | |
parent | m makefile (diff) | |
download | nightshift-de228ed2cd127c3fb79cec6f37d609b9f687728b.tar.gz nightshift-de228ed2cd127c3fb79cec6f37d609b9f687728b.tar.bz2 nightshift-de228ed2cd127c3fb79cec6f37d609b9f687728b.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rwxr-xr-x | src/__main__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/__main__.py b/src/__main__.py index 1fe2b50..a8f0723 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -414,7 +414,7 @@ def use_client(sock, proc): closed = False while not closed: try: - got = sock.recv(128).decode('utf-8', 'error') + got = sock.recv(128).decode('utf-8', 'strict') if (got is None) or (len(got) == 0): break except: @@ -912,7 +912,7 @@ if config_file is not None: # 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 |