X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=usertools%2Fdpdk-devbind.py;h=40dc28a7df9cfa2cccb1ad71d2afdd081fe1979c;hb=a4712f588e6e7f556698eea7fbc2514d175693a6;hp=7d564634ca4b73eea91d432c7f3eb453dc43d591;hpb=8a853e3f0275efc8b05cb195085d45946942744a;p=deb_dpdk.git diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 7d564634..40dc28a7 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -655,6 +655,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() clear_data()