Commit bd0674c0 authored by Gavin Mak's avatar Gavin Mak Committed by LUCI CQ

Fix remaining unicode py2+3 recipe module errors

Bug: 1227140
Change-Id: Ic29fff7556884935c301b35ba3995e281f178540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3124901Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
parent cc699f1c
......@@ -215,7 +215,7 @@ class GitApi(recipe_api.RecipeApi):
stdout=self.m.raw_io.output(),
step_test_data=lambda:
self.m.raw_io.test_api.stream_output('mirror_dir'))
mirror_dir = dir_cmd.stdout.strip()
mirror_dir = dir_cmd.stdout.strip().decode('utf-8')
self('remote', 'set-url', 'origin', mirror_dir,
can_fail_build=can_fail_build)
......
......@@ -24,16 +24,18 @@ def RunSteps(api):
suffix='build')
api.git_cl.set_description(
'bammmm', patch_url='https://code.review/123')
api.step('echo', ['echo', result.stdout])
api.step('echo', ['echo', result.stdout.decode('utf-8')])
api.git_cl.set_config('basic')
api.git_cl.c.repo_location = api.path.mkdtemp('fakerepo')
api.step('echo', ['echo', api.git_cl.get_description().stdout])
api.step(
'echo', ['echo', api.git_cl.get_description().stdout.decode('utf-8')])
api.git_cl.set_description('new description woo')
api.step('echo', ['echo', api.git_cl.get_description().stdout])
api.step(
'echo', ['echo', api.git_cl.get_description().stdout.decode('utf-8')])
def GenTests(api):
yield (
......
......@@ -231,7 +231,7 @@ class TryserverApi(recipe_api.RecipeApi):
step_test_data=lambda:
self.m.raw_io.test_api.stream_output('foo.cc'),
**kwargs)
paths = [self.m.path.join(patch_root, p) for p in
paths = [self.m.path.join(patch_root, p.decode('utf-8')) for p in
step_result.stdout.split()]
paths.sort()
if self.m.platform.is_win:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment