Skip to content

Commit 60be1fd

Browse files
authored
Merge pull request #32786 from compnerd/2-steps-forward-3-steps-back
test: make `test_util` more python 3 friendly
2 parents 2a70360 + 09ee4a6 commit 60be1fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/incrparse/test_util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ def escapeCmdArg(arg):
2222

2323

2424
def run_command(cmd):
25-
cmd = list(map(lambda s: s.encode('utf-8'), cmd))
25+
if sys.version_info[0] < 3:
26+
cmd = list(map(lambda s: s.encode('utf-8'), cmd))
2627
print(' '.join([escapeCmdArg(arg) for arg in cmd]))
2728
return subprocess.check_output(cmd, stderr=subprocess.STDOUT)
2829

0 commit comments

Comments
 (0)