Skip to content

Commit

Permalink
[Python] python track2 new pipeline fix (#16494)
Browse files Browse the repository at this point in the history
* encoding

* Update autorest_tools.py
  • Loading branch information
msyyc authored Feb 4, 2021
1 parent 98a87cb commit 05054a6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pathlib import Path
import shutil
import subprocess
import io

_LOGGER = logging.getLogger(__name__)

Expand Down Expand Up @@ -129,9 +128,10 @@ def execute_simple_command(cmd_line, cwd=None, shell=False, env=None):
universal_newlines=True,
cwd=cwd,
shell=shell,
env=env)
env=env,
encoding='utf-8')
output_buffer = []
for line in io.TextIOWrapper(process.stdout, encoding='utf-8'):
for line in process.stdout:
output_buffer.append(line.rstrip())
_LOGGER.info(f"==[autorest]"+output_buffer[-1])
process.wait()
Expand Down

0 comments on commit 05054a6

Please sign in to comment.