Skip to content

Commit

Permalink
Avoid suffix being None value
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Aug 17, 2024
1 parent fa48c6d commit cac9134
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion netfuse/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ def dump(
host_entries += "\n" + "*" * 83 + "\n\n"
for device in module.attached_devices():
if device.ipv4_address:
host_entries += f"{device.ipv4_address}\t{device.name}{suffix}\n"
host_entries += f"{device.ipv4_address}\t{device.name}"
if suffix:
host_entries += f"{suffix}\n"
else:
host_entries += "\n"
else:
LOGGER.debug(
"%s [%s] does not have an IP address", device.name, device.mac_address
Expand Down

0 comments on commit cac9134

Please sign in to comment.