adds common function to_list to network_common

used to coerce a value into a list
pull/20695/head
Peter Sprygada 8 years ago
parent 31d6b6ef67
commit 82dbe9853c

@ -27,6 +27,14 @@
#
from ansible.module_utils.six import iteritems
def to_list(val):
if isinstance(val, (list, tuple, set)):
return list(val)
elif val is not None:
return [val]
else:
return list()
class ComplexDict:
def __init__(self, attrs):

Loading…
Cancel
Save