Skip to content

Commit c397109

Browse files
committed
Python3 requires encoding the input string. Compatible with (at least) Python2.7
1 parent 588e61d commit c397109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runjinja.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
extra_vars = dict(len=len)
1717
input = sys.stdin.read()
18-
sys.stdout.write('/* DO NOT EDIT. md5sum of source: %s */' % hashlib.md5(input).hexdigest())
18+
sys.stdout.write('/* DO NOT EDIT. md5sum of source: %s */' % hashlib.md5(input.encode()).hexdigest())
1919
sys.stdout.write(env.from_string(input).render(**extra_vars))

0 commit comments

Comments
 (0)