From: Ondrej Lichtner <olichtne(a)redhat.com>
In case there are no slave options, the get_slave_options function
should return an empty list instead of None so that the function is
usable "for x in ..." loops.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Slave/NetConfigCommon.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lnst/Slave/NetConfigCommon.py b/lnst/Slave/NetConfigCommon.py
index 30517c7..d6fec98 100644
--- a/lnst/Slave/NetConfigCommon.py
+++ b/lnst/Slave/NetConfigCommon.py
@@ -40,7 +40,7 @@ def get_slave_options(netdev, slave_id):
try:
options = netdev["slave_options"][slave_id]
except KeyError:
- return None
+ return []
return options
def get_netem_option(netem_tag, netem_name, opt_name):
--
2.9.0