chore: make apply_all_patches.py work in both python2 and python3 (#19872)
This commit is contained in:
parent
81e9dab52f
commit
ef6d4a46c2
3 changed files with 4 additions and 3 deletions
|
@ -61,7 +61,7 @@ def am(repo, patch_data, threeway=False, directory=None, exclude=None,
|
|||
proc = subprocess.Popen(
|
||||
command,
|
||||
stdin=subprocess.PIPE)
|
||||
proc.communicate(patch_data)
|
||||
proc.communicate(patch_data.encode('utf-8'))
|
||||
if proc.returncode != 0:
|
||||
raise RuntimeError("Command {} returned {}".format(command,
|
||||
proc.returncode))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue