From: Jeremy Cline <jcline@redhat.com>
To: Shubham Singh <dhoni.singh094@gmail.com>, tglx@linutronix.de
Cc: akpm@linux-foundation.org, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scripts: spdxcheck: resovle decode warning for python3
Date: Mon, 1 Oct 2018 10:28:09 -0400 [thread overview]
Message-ID: <0923f0fe-53dc-a1e8-4db6-895d63db2b0d@redhat.com> (raw)
In-Reply-To: <20181001083846.9650-1-dhoni.singh094@gmail.com>
Hi Shubham,
On 10/01/2018 04:38 AM, Shubham Singh wrote:
> From: shubhsherl <dhoni.singh094@gmail.com>
>
> Resolve a warning issue by spdxcheck in Python3
> FAIL: 'str' object has no attribute 'decode'
>
> Signed-off-by: Shubham Singh <dhoni.singh094@gmail.com>
> ---
> 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
prev parent reply other threads:[~2018-10-01 14:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 8:38 Shubham Singh
2018-10-01 14:28 ` Jeremy Cline [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0923f0fe-53dc-a1e8-4db6-895d63db2b0d@redhat.com \
--to=jcline@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dhoni.singh094@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®