Commit 7fd7d0bb authored by martin f. krafft's avatar martin f. krafft Committed by Jeremy Kerr
Browse files

Decode patch from UTF-8 while parsing from stdin



Patchwork (rightfully) hashes patches using UTF-8:

  parser.py:
    def hash_patch(str):
      […]
      hash.update(line.encode('utf-8') + '\n')

This patch makes sure that it treats the incoming data as UTF-8 as well.
Signed-off-by: default avatarmartin f. krafft <madduck@madduck.net>
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent ad4715ce
......@@ -63,8 +63,7 @@ def parse_patch(text):
lc = (0, 0)
hunk = 0
for line in text.split('\n'):
for line in text.decode('utf-8').split('\n'):
line += '\n'
if state == 0:
......
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