Re: Fixing Python 3 syntax errors in tpm2_tests.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 17, 2019 at 11:28:34PM +0200, Christian Clauss wrote:
> Hello,
> 
>     As my very first contribution to the Linux Kernel, I would like to fix six Python 3 syntax errors in the file ./tools/testing/selftests/tpm2/tpm2_tests.py
> 
>     All six of these errors are of the same form: except ProtocolError, e:  To fix the syntax errors, I propose to change the comma (,) to “as” like:  except ProtocolError as e:
> 
>     These changes are important because the current form is compatible with Python 2 but is a syntax error in Python 3.  The proposed form is compatible with both Python 2 and Python3.  This conversion is required because Python 2 will reach its end of life in less than 200 days.
> 
>     The kernel contains at least five other files where I am able to detect Python 3 syntax errors but after studying in detail the process of making kernel modification, I believe that it is best to start with tpm2_tests.py because the changes are straightforward and uncontroversial — all issues are of the same form, and I can detect no other issues (such as undefined names) to fix in that file.
> 
>    If I succeed in getting the modifications to tpm2_tests.py through the review process then I can try the remaining files in turn.
> 
>    I would be interested to know if this is a worthwhile effort.  Is there already another initiative to resolve these issue before yearend?

Just send patches, and we will be glad to review them as-is.  No need to
ask permission ahead of time, we do not "reserve" tasks for people.

thanks,

greg k-h



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux