lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0923f0fe-53dc-a1e8-4db6-895d63db2b0d@redhat.com>
Date:   Mon, 1 Oct 2018 10:28:09 -0400
From:   Jeremy Cline <jcline@...hat.com>
To:     Shubham Singh <dhoni.singh094@...il.com>, tglx@...utronix.de
Cc:     akpm@...ux-foundation.org, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scripts: spdxcheck: resovle decode warning for python3

Hi Shubham,

On 10/01/2018 04:38 AM, Shubham Singh wrote:
> From: shubhsherl <dhoni.singh094@...il.com>
> 
> Resolve a warning issue by spdxcheck in Python3
> FAIL: 'str' object has no attribute 'decode'
> 
> Signed-off-by: Shubham Singh <dhoni.singh094@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ