From 180e83ab81b2bfe64385538d0b0639267890878b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 21 May 2026 10:16:05 -0400 Subject: [PATCH] Handle None Gateway value Change-Id: I1d76e6e9898349ab774437e195b3ba3ca6ee4ec3 --- pyghmi/redfish/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/redfish/command.py b/pyghmi/redfish/command.py index 847b647f..9a1c1538 100644 --- a/pyghmi/redfish/command.py +++ b/pyghmi/redfish/command.py @@ -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)