diff options
Diffstat (limited to 'usertools/dpdk-devbind.py')
-rwxr-xr-x | usertools/dpdk-devbind.py | 7 |
1 files changed, 7 insertions, 0 deletions
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() |