Add peer's site to str represetntation

This commit is contained in:
shortcutme 2019-11-25 14:31:12 +01:00
parent c21fe3d23a
commit a14c36cd3e
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -115,6 +115,9 @@ class Peer(object):
return self.connection return self.connection
def __str__(self): def __str__(self):
if self.site:
return "Peer:%-12s of %s" % (self.ip, self.site.address_short)
else:
return "Peer:%-12s" % self.ip return "Peer:%-12s" % self.ip
def __repr__(self): def __repr__(self):