usertools: fix refresh binding infos

Currently clear_data (dpdk-devbind.py) doesn't work as expected
since "global devices" is missing and so "devices" is considered
a local variable.

This commit changes "clear_data" function in order to really clear
devices by adding "global devices".

Fixes: ea9f00f7289a ("usertools: refactor NIC and crypto binding details")
Cc: stable@dpdk.org

Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Timothy Redaelli 2019-05-31 13:11:26 +02:00 committed by Thomas Monjalon
parent a70ed38841
commit 93b93beb12

View File

@ -216,6 +216,7 @@ def get_pci_device_details(dev_id, probe_lspci):
def clear_data():
'''This function clears any old data'''
global devices
devices = {}
def get_device_details(devices_type):