Message ID | 20210114021654.647242-25-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp75457jap; Wed, 13 Jan 2021 18:35:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFQEk/afyzcn2LBxVam7JRtsFPAkr+n2BJJFVKldyqYYAMjn/Y4HsZ++E47Vg4OXCzfl2R X-Received: by 2002:a25:c095:: with SMTP id c143mr7388853ybf.119.1610591757665; Wed, 13 Jan 2021 18:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610591757; cv=none; d=google.com; s=arc-20160816; b=rzx2Tlhrggow9sToq6Ae7pktG5jbJsqVPpGTvQfIFq+lrfLgkpEYwJLKjw1h7zgH5t YxRrAKr8cjIvep3QyUG9iDibiA8RiQHYHO2d8cZf5outf6KKCD9AlLrXqanX6oj4yrjo NQykZQkufV7aJtgH1ghpggx+P3Ih722xYwUm+XBaSQG26r7WTuzqS30u6c3Fd8f69Zia EV7VuyUn1pOqrqED+9HE9lTZHJkBTIsznLMEeSUwkGRtK9VzVYtc3mHduPJ2kcojzH0r RzZPmQ84J5iNGAzU2gZBfS2LS/2awSBiC+NOdUYJ/wwhXS4O7AJLxHDVWTX9eyaqoNrT mdgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=BFho4U3fob4m3gWpchyMGBLbmRuOR0wIULlt2gnx2gA=; b=GGCn+0LeaoEZGJnT7lTYTmm91kBgdt8qgOo7B1Cthq+UJ/hDYlnP4nkVcUwumL0til sxGgiXKhJfmGHPfppLZPp0isGe2zA8oVR6Tv2coxe8/zwJhiCBtEwRuT97mgjZk2pIGH EVWKjl8VvV3DCrlSxbGUCdpDGweUA+5MLXyNJOdn/yyOEQrhLzKtQ8A8DnX3axIrMZH9 gf50BZvoIcxeL+chx8j6mOy/ppcZGGm0CAxbvl1lGT+1MuL0C4KrUOnBwrQ+yH/WglVZ hg/sElNKvmykaeuY2nlZeH7E6uZ4qPrZiWEc0UsPOJmNzoEEtl6HbY2ifggpq/M9gP8L FFxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=P8AsBAjC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d14si2556147ybj.19.2021.01.13.18.35.57 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Jan 2021 18:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=P8AsBAjC; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1kzsUP-0000Ov-4c for patch@linaro.org; Wed, 13 Jan 2021 21:35:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1kzsCn-0003ve-Sj for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:45 -0500 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:36921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1kzsCh-0003Yu-Sh for qemu-devel@nongnu.org; Wed, 13 Jan 2021 21:17:45 -0500 Received: by mail-pg1-x52a.google.com with SMTP id z21so2748006pgj.4 for <qemu-devel@nongnu.org>; Wed, 13 Jan 2021 18:17:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BFho4U3fob4m3gWpchyMGBLbmRuOR0wIULlt2gnx2gA=; b=P8AsBAjCe1GbV/I2MyFKU+agoFuPCHOPymRwWQTXv2nvPqpqL9GU5Pcc35iufRjyGH 1Kirl1N2o9muhkqmfR9GPr9e2n1bfx2M8e7vigBCTScsOGs7GdsqQhBAkW8dGlgun8HG 1hygl/1M3Osn9roA64CdeurAdfay9+h2ousHY1Y4dsE7tPdOE2996gQyuJDiUCKjr/NX qabzgdu11LZG4RlWYimXkHS+R155yMGpf8Qq2J6mkfKVTmzQOABoDhKPkDvOVrpQ+gzy RCjScl1lgifWQCbFPOuwjXVpU/pbufYJKtCgbrauIQxUqbujRLjzDNm9iDtteicPxmaO RmoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BFho4U3fob4m3gWpchyMGBLbmRuOR0wIULlt2gnx2gA=; b=DeMwNja62hDFRYsZx13SLJgF50e1lq0oiLUsMXZRlDZ4H4aGsFouOBG3JkR6xCca1l qD5r/H4l/fHlo24jyP4gdeID31Asrjmq2SIDTlakRyDuJvxbFOdB2zWPnq/TPEYL+RUz AJ4p8ujmKLtRN6OYJa3ueaNqnjVLu2IcgqAZvVUQjNJvlHj9I4EXuw01zLdbWbY2bI1P Em4GC2Ng9SXcbZDAgqQWidSu7fuswub0qh37b0sRWzDP3pBvLUdpi9EJ+bopsqDjz0q8 6h5tsSov5WCFBTrZjMgn0e2rObck7PaBGxQilSZobFpzMayR0S/vg/u0RjInAFKH4PLf ehiA== X-Gm-Message-State: AOAM530tZ9+4Pea6s5ghiQeSnyOBzxOhD4cgAbD6PA1ssJkvTyiCC1Tv tbOYUeHA+2gxMJ3nPN+gbe2Tdg7IdwPObQ== X-Received: by 2002:a65:4347:: with SMTP id k7mr5024198pgq.186.1610590658332; Wed, 13 Jan 2021 18:17:38 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id i7sm3771687pfc.50.2021.01.13.18.17.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Jan 2021 18:17:37 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 24/24] decodetree: Open files with encoding='utf-8' Date: Wed, 13 Jan 2021 16:16:54 -1000 Message-Id: <20210114021654.647242-25-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210114021654.647242-1-richard.henderson@linaro.org> References: <20210114021654.647242-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: peter.maydell@linaro.org, Yonggang Luo <luoyonggang@gmail.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>, Eduardo Habkost <ehabkost@redhat.com> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg patch queue
|
expand
|
diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 47aa9caf6d..4637b633e7 100644 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -20,6 +20,7 @@ # See the syntax and semantics in docs/devel/decodetree.rst. # +import io import os import re import sys @@ -1304,7 +1305,7 @@ def main(): for filename in args: input_file = filename - f = open(filename, 'r') + f = open(filename, 'rt', encoding='utf-8') parse_file(f, toppat) f.close() @@ -1324,9 +1325,11 @@ def main(): prop_size(stree) if output_file: - output_fd = open(output_file, 'w') + output_fd = open(output_file, 'wt', encoding='utf-8') else: - output_fd = sys.stdout + output_fd = io.TextIOWrapper(sys.stdout.buffer, + encoding=sys.stdout.encoding, + errors="ignore") output_autogen() for n in sorted(arguments.keys()):