module utils: update code to python3 (#10907)

* module utils: update code to python3

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-12 00:42:11 +13:00 committed by GitHub
commit cc83188594
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 83 additions and 77 deletions

View file

@ -20,7 +20,7 @@ VXOS_VERSION = None
def get_version(iocs_json):
if not iocs_json:
raise Exception('Invalid IOC json')
active = filter(lambda x: x['mgmtRole'], iocs_json)
active = [x for x in iocs_json if x['mgmtRole']]
if not active:
raise Exception('Unable to detect active IOC')
active = active[0]