summaryrefslogtreecommitdiff
path: root/docs/users_guide/compare-flags.py
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-01-28 20:35:06 -0500
committerBen Gamari <ben@smart-cactus.org>2020-02-14 10:16:59 -0500
commit149e2a3a85d92b4afea1643e7e6ed7861d620be2 (patch)
tree0d70bbcbebb3e548047ef9858b8aff46707f3842 /docs/users_guide/compare-flags.py
parentfe02f78172f06fd3e83ba00246d9ed741474e653 (diff)
downloadhaskell-149e2a3a85d92b4afea1643e7e6ed7861d620be2.tar.gz
compare-flags: Don't rely on encoding flag of subprocess.check_output
Apparently it isn't supported by some slightly older Python versions.
Diffstat (limited to 'docs/users_guide/compare-flags.py')
-rwxr-xr-xdocs/users_guide/compare-flags.py5
1 files changed, 2 insertions, 3 deletions
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 != ''}