Commit 6f024270 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

parser: decode stdin from utf-8



We need to decode stdin from the patch parser as UTF-8, rather than
python assuming ascii.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 112de5d5
......@@ -222,7 +222,10 @@ def main(args):
(options, args) = parser.parse_args()
(patch, comment) = parse_patch(sys.stdin.read())
# decode from (assumed) UTF-8
content = sys.stdin.read().decode('utf-8')
(patch, comment) = parse_patch(content)
if options.print_hash and patch:
print hash_patch(patch).hexdigest()
......
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