Skip to content

Commit

Permalink
input.py: use text=True to not .decode("utf-8")
Browse files Browse the repository at this point in the history
  • Loading branch information
FuPeiJiang committed Aug 19, 2022
1 parent c3e909d commit 002afb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gyp/pylib/gyp/input.py
Expand Up @@ -967,7 +967,8 @@ def ExpandVariables(input, phase, variables, build_file):
stdout=subprocess.PIPE,
shell=use_shell,
cwd=build_file_dir,
check=False
check=False,
text=True
)
except Exception as e:
raise GypError(
Expand All @@ -980,7 +981,7 @@ def ExpandVariables(input, phase, variables, build_file):
"Call to '%s' returned exit status %d while in %s."
% (contents, result.returncode, build_file)
)
replacement = result.stdout.decode("utf-8").rstrip()
replacement = result.stdout.rstrip()

cached_command_results[cache_key] = replacement
else:
Expand Down

0 comments on commit 002afb4

Please sign in to comment.