Skip to content

Commit

Permalink
Always include broadcast in IPv4 info
Browse files Browse the repository at this point in the history
Fixes union operand not being allowed for dicts in Python <3.9.
  • Loading branch information
Fizzadar authored Nov 26, 2023
1 parent 3fd3f07 commit 5adb298
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pyinfra/facts/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,8 @@ def mask(value):
"address": address,
"mask_bits": mask_bits,
"netmask": netmask,
}
| {"broadcast": broadcast}
if broadcast
else {}
"broadcast": broadcast,
},
)
device_info["ipv4"] = ipv4_info[0]
if len(ipv4_matches) > 1:
Expand Down

0 comments on commit 5adb298

Please sign in to comment.