add python2 deprecation notice

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

diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py
index 6f129b1db..5423c7965 100755
--- a/usertools/cpu_layout.py
+++ b/usertools/cpu_layout.py
@@ -10,6 +10,10 @@
 except NameError:
     xrange = range # Python 3
 
+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)
+
 sockets = []
 cores = []
 core_map = {}
-- 
2.17.1

Reply via email to