diff --git a/src/azure-cli/azure/cli/command_modules/container/custom.py b/src/azure-cli/azure/cli/command_modules/container/custom.py index 867e30eba86..df230ec984b 100644 --- a/src/azure-cli/azure/cli/command_modules/container/custom.py +++ b/src/azure-cli/azure/cli/command_modules/container/custom.py @@ -682,6 +682,8 @@ def _cycle_exec_pipe(ws): r, _, _ = select.select([ws.sock, sys.stdin], [], []) if ws.sock in r: data = ws.recv() + if isinstance(data, bytes): + data = data.decode('utf-8') sys.stdout.write(data) sys.stdout.flush() if sys.stdin in r: