Merge pull request #1753 from eikef/issue1616
Fixes #1616, check whether interface-list exits before querying its length
This commit is contained in:
commit
083383a2c7
1 changed files with 5 additions and 3 deletions
|
@ -291,6 +291,8 @@ class Host(object):
|
|||
# check the exist_interfaces whether it equals the interfaces or not
|
||||
def check_interface_properties(self, exist_interface_list, interfaces):
|
||||
interfaces_port_list = []
|
||||
|
||||
if interfaces is not None:
|
||||
if len(interfaces) >= 1:
|
||||
for interface in interfaces:
|
||||
interfaces_port_list.append(int(interface['port']))
|
||||
|
|
Loading…
Reference in a new issue