X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Fpatchwork%2Fparser.py;h=2b5e9a093c478756d65ef001cdb59e48eb0af0c5;hb=c2c6a408c7764fa29389ce160f52776c9308d50a;hp=16cc30851e6cc8f38e34cb0e66491cdd84bf347c;hpb=6cf42625073d11bd63adc681a4d141a932925d0e;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()