- after upgrade to Neon platform empty lists
are removed from datastore
- this is also case for connections list -
do not try to parse it if its missing
Change-Id: I04a3695ecd76d3a13b1abee7e5b36738433dd759
Signed-off-by: Ivan Hrasko <ihrasko@cisco.com>
"""
data = json.loads(connections_json)
- connections = data['output']['connections']
- output = []
- for connection in connections.values():
- output += connection
- return output
+ output = data['output']
+ result = []
+ if output:
+ connections = output['connections']
+ for connection in connections.values():
+ result += connection
+ return result
def find_connection(connections_json, version, mode, ip, port, state):