change IRCServer.Server.__str__ to return hostname:port instead of full __repr__
This commit is contained in:
parent
5602b95d70
commit
2728a8422f
1 changed files with 3 additions and 3 deletions
|
@ -56,10 +56,10 @@ class Server(object):
|
||||||
self.bot.events.on("timer").on("rejoin").hook(self.try_rejoin)
|
self.bot.events.on("timer").on("rejoin").hook(self.try_rejoin)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "IRCServer.Server(%s:%s%s)" % (self.target_hostname,
|
return "IRCServer.Server(%s)" % self.__str__()
|
||||||
"+" if self.tls else "", self.port)
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self)
|
return "%s:%s%s" % (self.target_hostname, "+" if self.tls else "",
|
||||||
|
self.port)
|
||||||
def fileno(self):
|
def fileno(self):
|
||||||
fileno = self.socket.fileno()
|
fileno = self.socket.fileno()
|
||||||
return self.cached_fileno if fileno == -1 else fileno
|
return self.cached_fileno if fileno == -1 else fileno
|
||||||
|
|
Loading…
Reference in a new issue