X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fparser.py;fp=apps%2Fpatchwork%2Fparser.py;h=2b5e9a093c478756d65ef001cdb59e48eb0af0c5;hb=6f02427039f0a80484f99ebd4595e2ecdfc907bb;hp=16cc30851e6cc8f38e34cb0e66491cdd84bf347c;hpb=112de5d5dc557dc660701a6686dbd47033bff19e;p=patchwork diff --git a/apps/patchwork/parser.py b/apps/patchwork/parser.py index 16cc308..2b5e9a0 100644 --- a/apps/patchwork/parser.py +++ b/apps/patchwork/parser.py @@ -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()