From 619b227eff2aee3002fdfdc8196a19f154a40a47 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 21 Oct 2015 14:42:52 +0200 Subject: [PATCH] * wrap/python/spot.py (automata): Use universal_newlines. --- wrap/python/spot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrap/python/spot.py b/wrap/python/spot.py index f9878f4b8..3ac8a5a07 100644 --- a/wrap/python/spot.py +++ b/wrap/python/spot.py @@ -366,7 +366,9 @@ def automata(*sources, timeout=None): p = automaton_stream_parser(proc.stdout.fileno(), filename, True) else: + # universal_newlines for str output instead of bytes out = subprocess.check_output(filename[:-1], shell=True, + universal_newlines=True, timeout=timeout) p = automaton_stream_parser(out, filename, True) elif '\n' in filename: