Merge tag 'upstream/16.11.9' into 16.11.x
[deb_dpdk.git] / tools / dpdk-devbind.py
index e7cfcd0..47597de 100755 (executable)
@@ -609,6 +609,13 @@ def do_arg_actions():
 
 def main():
     '''program main function'''
+    # check if lspci is installed, suppress any output
+    with open(os.devnull, 'w') as devnull:
+        ret = subprocess.call(['which', 'lspci'],
+                              stdout=devnull, stderr=devnull)
+        if ret != 0:
+            print("'lspci' not found - please install 'pciutils'")
+            sys.exit(1)
     parse_args()
     check_modules()
     get_nic_details()