Skip to content

Commit

Permalink
Fix bin/jp-compliance: specify encode for compatibility in Python3
Browse files Browse the repository at this point in the history
This avoids following error in Python3: “TypeError: a bytes-like object is required, not 'str’”
  • Loading branch information
tmshn committed Oct 11, 2017
1 parent ccb2158 commit 48e9160
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/jp-compliance
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class ComplianceTestRunner(object):
command.append(test_case['expression'])
process = subprocess.Popen(command, stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE)
stdin=subprocess.PIPE,
encoding='utf-8')
process.stdin.write(json.dumps(test_case['given']))
process.stdin.flush()
stdout, stderr = process.communicate()
Expand Down

0 comments on commit 48e9160

Please sign in to comment.