Skip to content

Commit 5bfb220

Browse files
committed
BLD: py3 compat in scripts/merge-pr.py
1 parent 4df08a9 commit 5bfb220

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/merge-py.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ def run_cmd(cmd):
9898
if cmd is None:
9999
cmd = popenargs[0]
100100
raise subprocess.CalledProcessError(retcode, cmd, output=output)
101-
return six.text_type(output)
101+
102+
if isinstance(output, six.binary_type):
103+
output = output.decode('utf-8')
104+
return output
102105

103106

104107
def continue_maybe(prompt):
@@ -123,6 +126,7 @@ def clean_up():
123126

124127
# merge the requested PR and return the merge hash
125128
def merge_pr(pr_num, target_ref):
129+
126130
pr_branch_name = "%s_MERGE_PR_%s" % (BRANCH_PREFIX, pr_num)
127131
target_branch_name = "%s_MERGE_PR_%s_%s" % (BRANCH_PREFIX, pr_num,
128132
target_ref.upper())

0 commit comments

Comments
 (0)