Python3 requires encoding the input string. Compatible with (at least) Python2.7
This commit is contained in:
parent
588e61dab6
commit
c3971099b3
1 changed files with 1 additions and 1 deletions
|
@ -15,5 +15,5 @@ env = Environment(block_start_string='/*{',
|
|||
|
||||
extra_vars = dict(len=len)
|
||||
input = sys.stdin.read()
|
||||
sys.stdout.write('/* DO NOT EDIT. md5sum of source: %s */' % hashlib.md5(input).hexdigest())
|
||||
sys.stdout.write('/* DO NOT EDIT. md5sum of source: %s */' % hashlib.md5(input.encode()).hexdigest())
|
||||
sys.stdout.write(env.from_string(input).render(**extra_vars))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue