From 149e2a3a85d92b4afea1643e7e6ed7861d620be2 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 28 Jan 2020 20:35:06 -0500 Subject: compare-flags: Don't rely on encoding flag of subprocess.check_output Apparently it isn't supported by some slightly older Python versions. --- docs/users_guide/compare-flags.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/users_guide/compare-flags.py') diff --git a/docs/users_guide/compare-flags.py b/docs/users_guide/compare-flags.py index bfb8da65cf..d18abb4d7a 100755 --- a/docs/users_guide/compare-flags.py +++ b/docs/users_guide/compare-flags.py @@ -48,10 +48,9 @@ def read_documented_flags(doc_flags) -> Set[str]: if line != ''} def read_ghc_flags(ghc_path: str) -> Set[str]: - ghc_output = subprocess.check_output([ghc_path, '--show-options'], - encoding='UTF-8') + ghc_output = subprocess.check_output([ghc_path, '--show-options']) return {flag - for flag in ghc_output.split('\n') + for flag in ghc_output.decode('UTF-8').split('\n') if not expected_undocumented(flag) if flag != ''} -- cgit v1.2.1