mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixing issue when information returned from ipset isn't in the format we expect and it causes an exception.
This commit is contained in:
parent
7a58878ea8
commit
f0c6090c7e
1 changed files with 4 additions and 2 deletions
|
@ -510,8 +510,10 @@ def _find_set_info(set):
|
|||
setinfo = {}
|
||||
_tmp = out['stdout'].split('\n')
|
||||
for item in _tmp:
|
||||
key, value = item.split(':', 1)
|
||||
setinfo[key] = value[1:]
|
||||
# Only split if item has a colon
|
||||
if ':' in item:
|
||||
key, value = item.split(':', 1)
|
||||
setinfo[key] = value[1:]
|
||||
return setinfo
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue