From eb8ed7e3404d3b578cd563a4456a3136471de677 Mon Sep 17 00:00:00 2001 From: Shlomi Fish Date: Sat, 3 Mar 2018 20:09:43 +0200 Subject: [PATCH] Fix the solver detection in py3/etc. See https://github.com/shlomif/PySolFC/pull/53 - thanks to @lufebe16 . --- pysollib/init.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pysollib/init.py b/pysollib/init.py index 098720b7..bc822548 100644 --- a/pysollib/init.py +++ b/pysollib/init.py @@ -137,7 +137,10 @@ def init(): kw['close_fds'] = True p = subprocess.Popen(pysollib.settings.FCS_COMMAND+' --help', **kw) p.stdin.close() - if p.stdout.readline().startswith('fc-solve'): + line = p.stdout.readline() + if sys.version_info >= (3,): + line = line.decode("utf-8") + if line.startswith('fc-solve'): pysollib.settings.USE_FREECELL_SOLVER = True if os.name == 'posix': os.wait() # kill zombi