2
0
mirror of https://opendev.org/x/pyghmi synced 2026-06-15 08:10:46 +00:00

Merge "Handle None Gateway value"

This commit is contained in:
Zuul
2026-05-21 14:27:13 +00:00
committed by Gerrit Code Review
+1 -1
View File
@@ -1093,7 +1093,7 @@ class Command(object):
cidr = _mask_to_cidr(currip['SubnetMask'])
retval['ipv4_address'] = '{0}/{1}'.format(currip['Address'], cidr)
retval['mac_address'] = netcfg['MACAddress']
hasgateway = _mask_to_cidr(currip['Gateway'])
hasgateway = _mask_to_cidr(currip['Gateway']) if currip['Gateway'] else None
retval['ipv4_gateway'] = currip['Gateway'] if hasgateway else None
retval['ipv4_configuration'] = currip['AddressOrigin']
tagged = netcfg.get('VLAN', {}).get('VLANEnable', False)