[dpdk-stable] [PATCH] usertools: Fix clearing any old data
Timothy Redaelli
tredaelli at redhat.com
Fri May 31 13:11:26 CEST 2019
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".
CC: stable at dpdk.org
Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
---
usertools/dpdk-devbind.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py
index 9e79f0d28..e6b551d33 100755
--- a/usertools/dpdk-devbind.py
+++ b/usertools/dpdk-devbind.py
@@ -210,6 +210,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):
--
2.21.0
More information about the stable
mailing list