Skip to content

Commit

Permalink
Merge pull request #53 from DMTF/Null-Array-Member-Fix
Browse files Browse the repository at this point in the history
Added missing check for null array members prior to performing property inspection
  • Loading branch information
mraineri authored Jul 23, 2021
2 parents 84bf922 + 984a2d9 commit 8eabb0b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ def dummy_address_check( address ):
# Check for expected IPv4 properties
if property in property_ip_list:
for i, address in enumerate( interface_resp.dict[property] ):
# Skip null entries
if address is None:
continue

# Check that there is only a Gateway for index 0
if "IPv4" in property:
if "Gateway" in address and i != 0:
Expand Down

0 comments on commit 8eabb0b

Please sign in to comment.