From patchwork Thu Nov 7 16:14:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1191254 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="k5BfQH3I"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 4787lS3sxxz9sNT for ; Fri, 8 Nov 2019 03:14:44 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 27465C21DA6; Thu, 7 Nov 2019 16:14:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B3F4AC21C3F; Thu, 7 Nov 2019 16:14:36 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2E9C3C21C3F; Thu, 7 Nov 2019 16:14:35 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id BFD23C21BE5 for ; Thu, 7 Nov 2019 16:14:33 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id 1so2904743iou.4 for ; Thu, 07 Nov 2019 08:14:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=H4kB/+uIpKN1VUx+DCSf3UTa1DxRuFD4U+K9ANidlUE=; b=k5BfQH3IrG83V1S3dwfqv/LyXHBlo1My59MZSqbJwlNmmrqRtlHtJoKDOu9+UBGGc/ Kk2KbtIRgJgVKDscLe+o8THxsIz7sebpTetRsV9cizPfIYEJ/7uAF0H7BP5Fvo7oE2HR zAZcfzEgXgkbwPS3YjNbGv5MymeSgCkpEtThw= 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:mime-version :content-transfer-encoding; bh=H4kB/+uIpKN1VUx+DCSf3UTa1DxRuFD4U+K9ANidlUE=; b=SLqavH2nCraqEeXf6WGoCV/1D3EusWO6a7YzCbTrjcpmvXsbV1G6wyF7eQkD64MjwF w9qWnfjVsXqswG78vL+c0nOu/R19mnfnIiC8R8OwdYZn4TUPAknPIeY5z/POfeVVtIYP n7KG85JZaEw7OUYLG6aVR71SHTDxpiHoYNO7EB24QETu5oWpcy2zGa1QQ+Asvsleg+dP 6LofVSv0EZg6FY+mLH7HCJ8lzPp/nrb98PcQCpk4l2/FuMrsPB+ewyD7WYHqJApaqbi+ bkRMQGLxZhPBM8Tptk5hxqjjDMAR9AzNEg/NjxJ/i3VacAi9JlVjglGulGTO1XOdrWLH HYYw== X-Gm-Message-State: APjAAAUVjAabrW99G8Wg5kBRiAf0C94lvkcrBA+Sufvn32tcdHHFPCA5 mZGg1OnqkzPLrT1SR62AopYTNDzJfekROg== X-Google-Smtp-Source: APXvYqzgS1ap+N3GQ/Ap5vvLAY/Fvn7Xgu3UOJSBQRVI9U3JUuToflVHniGzQEwobl54xEC745aDVA== X-Received: by 2002:a02:a78f:: with SMTP id e15mr4968153jaj.23.1573143272457; Thu, 07 Nov 2019 08:14:32 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id o9sm389594ilg.31.2019.11.07.08.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 08:14:32 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Thu, 7 Nov 2019 09:14:29 -0700 Message-Id: <20191107161429.116770-1-sjg@chromium.org> X-Mailer: git-send-email 2.24.0.rc1.363.gb1bccd3e3d-goog MIME-Version: 1.0 Cc: Tom Rini , Dmitry Torokhov Subject: [U-Boot] [PATCH] patman: Fix cc-cmd option for Python 3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Python 3 conversion doesn't work correctly with the new patch to use NUL as the separator in the CC file. Fix this by avoiding encoding the CC list written to the file. Signed-off-by: Simon Glass --- tools/patman/patman.py | 2 +- tools/patman/series.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/patman/patman.py b/tools/patman/patman.py index cf53e532dd..ca209c276d 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -107,7 +107,7 @@ elif options.test: # Called from git with a patch filename as argument # Printout a list of additional CC recipients for this patch elif options.cc_cmd: - fd = open(options.cc_cmd, 'r') + fd = open(options.cc_cmd, 'r', encoding='utf-8') re_line = re.compile('(\S*) (.*)') for line in fd.readlines(): match = re_line.match(line) diff --git a/tools/patman/series.py b/tools/patman/series.py index 02a1113ad0..a15f7625ed 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -251,7 +251,7 @@ class Series(dict): cover_cc = [tools.FromUnicode(m) for m in cover_cc] cc_list = '\0'.join([tools.ToUnicode(x) for x in sorted(set(cover_cc + all_ccs))]) - print(cover_fname, cc_list.encode('utf-8'), file=fd) + print(cover_fname, cc_list, file=fd) fd.close() return fname