Commit dadd074f authored by Andrew Gibiansky's avatar Andrew Gibiansky

Use stdin argument instead of input for subprocess; makes it python 3.2 compatible

parent a69fd101
......@@ -18,3 +18,4 @@ profile/profile.tar
cabal.sandbox.config
.tmp1
.tmp2
.tmp3
......@@ -8,8 +8,11 @@ import subprocess
def hindent(contents):
with open(".tmp3", "w") as f:
f.write(contents)
with open(".tmp3", "r") as f:
output = subprocess.check_output(["hindent", "--style", "gibiansky"],
input=bytes(contents, 'utf-8'))
stdin=f)
return output.decode('utf-8')
......
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