[3/9] usertools/dpdk-devbind: add python2 deprecation notice
diff mbox series

Message ID 20200710101055.33671-4-louise.kilheeney@intel.com
State Accepted, archived
Delegated to: David Marchand
Headers show
Series
  • python2 deprecation notice
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Louise Kilheeney July 10, 2020, 10:10 a.m. UTC
add python2 deprecation notice

Signed-off-by: Louise Kilheeney <louise.kilheeney@intel.com>
---
 usertools/dpdk-devbind.py | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox series

diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index dc008823f..86b6b53c4 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -10,6 +10,10 @@ 
 import subprocess
 from os.path import exists, abspath, dirname, basename
 
+if sys.version_info.major < 3:
+    print("WARNING: Python 2 is deprecated for use in DPDK, and will not work in future releases.", file=sys.stderr)
+    print("Please use Python 3 instead", file=sys.stderr)
+
 # The PCI base class for all devices
 network_class = {'Class': '02', 'Vendor': None, 'Device': None,
                     'SVendor': None, 'SDevice': None}