Skip to content

Commit

Permalink
Only decode if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredhobbs committed Jan 12, 2021
1 parent 997b8df commit 9319704
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion zappa/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,11 @@ def create_handler_venv(self):
pip_return_code = pip_process.returncode

if pip_return_code:
output = pip_process.stdout
if hasattr(output, 'decode'):
output = output.decode('utf-8')
raise EnvironmentError(
"Pypi lookup failed\n{}".format(pip_process.stdout.decode('utf-8'))
"Pypi lookup failed\n{}".format(output)
)

return ve_path
Expand Down

0 comments on commit 9319704

Please sign in to comment.