[20.08,2/9] usertools/dpdk-devbind: support python3 only
Checks
Commit Message
Changed script to explicitly use python3 only.
Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
---
usertools/dpdk-devbind.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On 22-May-20 2:23 PM, Louise Kilheeney wrote:
> Changed script to explicitly use python3 only.
>
> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
> ---
There is a bunch of old cruft in a few scripts, such as python
compatibility checks and reimplementation of check_output. it would be
nice if those were fixed as well.
If you look for imports or the word "python" in code, chance are you'll
find some comments saying something about "let's do this hack for python
2 compatibility" :)
On 28-May-20 1:39 PM, Burakov, Anatoly wrote:
> On 22-May-20 2:23 PM, Louise Kilheeney wrote:
>> Changed script to explicitly use python3 only.
>>
>> Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
>> ---
>
> There is a bunch of old cruft in a few scripts, such as python
> compatibility checks and reimplementation of check_output. it would be
> nice if those were fixed as well.
>
> If you look for imports or the word "python" in code, chance are you'll
> find some comments saying something about "let's do this hack for python
> 2 compatibility" :)
>
I would also suggest using /usr/bin/env python3 rather than explicit
path to /usr/bin/python3.
@@ -1,9 +1,8 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
#
-from __future__ import print_function
import sys
import os
import getopt