Improve IRCServer.Server's __repr__
This commit is contained in:
parent
f2b2ac52e7
commit
ab543022c4
1 changed files with 3 additions and 2 deletions
|
@ -54,9 +54,10 @@ class Server(object):
|
||||||
self.socket = context.wrap_socket(self.socket)
|
self.socket = context.wrap_socket(self.socket)
|
||||||
self.cached_fileno = self.socket.fileno()
|
self.cached_fileno = self.socket.fileno()
|
||||||
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 "%s:%s%s" % (self.target_hostname, "+" if self.tls else "",
|
return "IRCServer.Server(%s:%s%s)" % (self.target_hostname,
|
||||||
self.port)
|
"+" if self.tls else "", self.port)
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self)
|
return repr(self)
|
||||||
def fileno(self):
|
def fileno(self):
|
||||||
|
|
Loading…
Reference in a new issue