Skip to content

Commit

Permalink
fix host string method
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Sep 18, 2023
1 parent ff48921 commit e8cab8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions prometheuspvesd/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ def __init__(self, vmid, hostname, ipv4_address, ipv6_address, pve_type):
self.add_label("vmid", vmid)

def __str__(self):
return f"{self.hostname}({self.vmid}): {self.pve_type} \
{self.ipv4_address} {self.ipv6_address}"
return (
f"{self.hostname}({self.vmid}): "
f"{self.pve_type} {self.ipv4_address} {self.ipv6_address}"
)

def add_label(self, key, value):
key = key.replace("-", "_").replace(" ", "_")
Expand Down

0 comments on commit e8cab8d

Please sign in to comment.