Skip to content

Commit

Permalink
Restore Python 3 support for parser
Browse files Browse the repository at this point in the history
  • Loading branch information
pfernique committed Sep 19, 2017
1 parent 73c0460 commit 69d65b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/py/autowig/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,10 @@ def bootstrap(asg, flags, **kwargs):
headers.append("}")
forbidden.update(set(gray))
header = NamedTemporaryFile(delete=False)
header.write('\n'.join(headers))
if six.PY2:
header.write('\n'.join(headers))
else:
header.write(('\n'.join(headers)).encode())
header.close()
asg = parser(asg, [header.name], flags +["-Wno-unused-value", "-ferror-limit=0"], bootstrapping=True, **kwargs)
os.unlink(header.name)
Expand Down

0 comments on commit 69d65b7

Please sign in to comment.