Re: [PATCH] scripts: Add Python 3 compatibility to spdxcheck.py

From: Thomas Gleixner
Date: Thu Jul 19 2018 - 10:58:13 EST


On Tue, 17 Jul 2018, Jeremy Cline wrote:

> "dict.has_key(key)" on dictionaries has been replaced with "key in
> dict". Additionally, when run under Python 3 some files don't decode
> with the default encoding (tested with UTF-8). To handle that, don't
> open the file in text mode and decode text line-by-line, ignoring
> encoding errors.
>
> This remains compatible with Python 2 and should have no functional
> change.
>
> Signed-off-by: Jeremy Cline <jcline@xxxxxxxxxx>

Acked-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>