Add peer's site to str represetntation
This commit is contained in:
parent
c21fe3d23a
commit
a14c36cd3e
1 changed files with 4 additions and 1 deletions
|
@ -115,7 +115,10 @@ class Peer(object):
|
||||||
return self.connection
|
return self.connection
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "Peer:%-12s" % self.ip
|
if self.site:
|
||||||
|
return "Peer:%-12s of %s" % (self.ip, self.site.address_short)
|
||||||
|
else:
|
||||||
|
return "Peer:%-12s" % self.ip
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<%s>" % self.__str__()
|
return "<%s>" % self.__str__()
|
||||||
|
|
Loading…
Reference in a new issue