Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp114685imm; Mon, 1 Oct 2018 07:30:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV63LZ71FcRIMmtwtgS2D1BTmOZ9ztmXna/yCYGMkMqaYe+RbI0QYEsbCjxw67wvqBgPkks8u X-Received: by 2002:a17:902:e28a:: with SMTP id cf10-v6mr12067349plb.4.1538404204590; Mon, 01 Oct 2018 07:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538404204; cv=none; d=google.com; s=arc-20160816; b=B2mUPu5WFLRkGops4Y4l38+5gIEeF0g0Uy48xXQKkJhEN9i1opksMTeU0+cS3SXdPy DXEfUCcg2PFWyOiR3KQp86qgtjJXs1aSQ8GaAGIrXRAfBBqYtmrNp+M+72k3+UTQh5hE 4t4mS6vkOiBLQX/YcZEbTp7SsBD1W9rX0j8FEvcbI2VniGIGvlDxgTGC4FVo/8p7E5dx XzNHaLxdejrf0gY8RsV/gJSIm7lGdQQ4sdJiy+QygCH92dgK4nb9WRnZdbenh848u7mW 1FfEv55RTqloZHsGQTCt10+HtmBVOstLtunS8I4XmiNo/lPskmlRoSip48LZFQVXc8yG LmkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:cc:to:subject; bh=pnUyy63nV0ASgHMX4OU7rJuubaauBOh5id8/u7V+nQw=; b=JPJOx5IRsRKkpQQNBpj9RwQZCgn+who5VArGc6OBpXbPm7nyOtYVMlUgxBJpVdqgU2 3CXAxku3yqghF14V1NJr82mwJz4aGu9o3Er+7TJWy9h3QJG9+GAtHlcAorLNjk3I719V Ut+RAe63LqOIiepcNQAcDjqzTHmd45AL8IunJwXAES1mMo/bZMu4AKyX3dgvFGXSvQDw l2oyKedzCH+Mn/grn2AakoKGPw7lpGQUA+w5W++32KpupOWiRG+ZyLludklJFo/ldgFH dGAtXn3ihMDIJlQE768EWq/rfycyUaxBtqeGsfUtVj/Ft0eI0Lzm3ZBvNqmGmqA/wsar 1XWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s59-v6si12819206plb.341.2018.10.01.07.29.49; Mon, 01 Oct 2018 07:30:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729469AbeJAVGR (ORCPT + 99 others); Mon, 1 Oct 2018 17:06:17 -0400 Received: from mail-yw1-f68.google.com ([209.85.161.68]:41417 "EHLO mail-yw1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729378AbeJAVGR (ORCPT ); Mon, 1 Oct 2018 17:06:17 -0400 Received: by mail-yw1-f68.google.com with SMTP id q129-v6so5531759ywg.8 for ; Mon, 01 Oct 2018 07:28:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=pnUyy63nV0ASgHMX4OU7rJuubaauBOh5id8/u7V+nQw=; b=efGyXneVWA7wQPqtKBfpMHPWcQpaHbmLF/YdjoWO4d8f/KVpQ9YS94BB8ncpuvNiCu DNjc7r+QgQutXUqBb8avzCYR31kf501HTms23RT7SIhVp+JswGQarrf+7oDUp2+/kPFM SCrr+iSqOYm029QldBNcKgCucMuZXuZVwGsB72Bwz8/YPKSu9cIJUA4fUJrhlIZvBXDH InLhyu7VxK0kcDx5LTCucrZA7CnGEaU11KEYp1ooyLJlb78UzHmZireo9o0TiXM6RH1j wYzKdKE2ZLiV10TTkXkVweI3Qpow0IKiRBond5q1JZ/Fj28n+dyvnt8TVbyhF2ru4V8x cngQ== X-Gm-Message-State: ABuFfoj1QvZW+UMhKh9bs+mnxM9hvnbDoVRR/untO8KCSv5E/47l0sIJ indE1P7anmPQFpa70vYF/yKfapC9sPA= X-Received: by 2002:a0d:fac3:: with SMTP id k186-v6mr5882218ywf.456.1538404091353; Mon, 01 Oct 2018 07:28:11 -0700 (PDT) Received: from laptop.jcline.org (075-177-179-204.res.spectrum.com. [75.177.179.204]) by smtp.gmail.com with ESMTPSA id q1-v6sm343863ywa.92.2018.10.01.07.28.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 07:28:10 -0700 (PDT) Subject: Re: [PATCH] scripts: spdxcheck: resovle decode warning for python3 To: Shubham Singh , tglx@linutronix.de Cc: akpm@linux-foundation.org, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org References: <20181001083846.9650-1-dhoni.singh094@gmail.com> From: Jeremy Cline Openpgp: preference=signencrypt Autocrypt: addr=jcline@redhat.com; keydata= xsFNBFThCPYBEACx9hl05pMfpVKVjm8Yrmd2I3sm9Jw7EIGfn1tmncSnzfveN7UcIjYI23Gw DE11Hf70tMZKXhNmQqDqoftEDwLbTuzBdgJXFZmfEwrcQHGiR5CZ4IQ3U7SF0a701lyYtuNs WndEO8CCaWHUYybiEl1yRZhwyzAA1j/izilD7FckOaEsTM1sFVDs74qWsNGIdJXYQ5dz/iV/ 45wgYNprfMTZQXLvbGIjAD6rmvu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nreanQFYTTgzC 6i/dtsWrd3DvJzaxKdUrSjioP1tK6YLpS7SSc5khYUjVp7xdsu9vCazsLspzBYbQOV02xtI5 CTLwMzh4hYE1/66K899++0v2dP9m9DEKu/R4vqW4axTfWIbR/ygd1bh2a/7NpAT6qiJg8vha Qkf/fVKZ9xM7EDHmfFJscqC6JyYNdYvz8wJ0aa9Z6zvnNUzjAntj62kJV8b8m5diUQDUI8dp r9crk+XxOTNpYid6p8mlNTcX54LTy1eEL7BYG1S3ezcLZC9/78MTdTJbxQMz7/zQXOABfMDy +otLuhEBxi5hl+COIsiRotTOBNPNr1UmV4fQjXz2K6cfgaO/9NilQaEU6zpsMcAOi5lLxlzD GRyPO2a0QQFZ7FmH9dRWw/6mmspQMBNRr5CrQdIBiWDcJGNPl8iX9TqwP62dZgwANT6+FR7K If4axm/gJQMSUCon3eLJhi8b5qZp4vZn7Xj4hCswrO9eExmT9IjpRVcHLYti36m99WRvItDy dVvrvIQi5qah3PrQjtwSJ61ExSZTOpBQGC60yQf+GG0TISIeeXX8CK2e1PIDt7/l+d0onCmU /98IQsNgR/9sifmdPeh3nKsxe2vsa3HNeElQU2ko6ZHMrE0gSyel5vaqRLQQwekBx1mr/7Ll X/87hZ4pdW/aOXUAgQ== Message-ID: <0923f0fe-53dc-a1e8-4db6-895d63db2b0d@redhat.com> Date: Mon, 1 Oct 2018 10:28:09 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20181001083846.9650-1-dhoni.singh094@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Shubham, On 10/01/2018 04:38 AM, Shubham Singh wrote: > From: shubhsherl > > Resolve a warning issue by spdxcheck in Python3 > FAIL: 'str' object has no attribute 'decode' > > Signed-off-by: Shubham Singh > --- > scripts/spdxcheck.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/scripts/spdxcheck.py b/scripts/spdxcheck.py > index 839e190bbd7a..6eea4073f28a 100755 > --- a/scripts/spdxcheck.py > +++ b/scripts/spdxcheck.py > @@ -168,7 +168,8 @@ class id_parser(object): > self.curline = 0 > try: > for line in fd: > - line = line.decode(locale.getpreferredencoding(False), errors='ignore') > + if type(line) != str: > + line = line.decode(locale.getpreferredencoding(False), errors='ignore') > self.curline += 1 > if self.curline > maxlines: > break > This looks to be a fix for the same issue addressed by "[PATCH] scripts/spdxcheck.py: improve Python 3 compat"[0]. Can you reproduce the warning with that patch? [0] https://marc.info/?l=linux-kernel&m=153713239404809