From ab543022c41d6cfde30ccad8014d0b3e2d9271cc Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 28 Aug 2018 15:14:41 +0100 Subject: [PATCH] Improve IRCServer.Server's __repr__ --- IRCServer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/IRCServer.py b/IRCServer.py index 5575e680..0908dc76 100644 --- a/IRCServer.py +++ b/IRCServer.py @@ -54,9 +54,10 @@ class Server(object): self.socket = context.wrap_socket(self.socket) self.cached_fileno = self.socket.fileno() self.bot.events.on("timer").on("rejoin").hook(self.try_rejoin) + def __repr__(self): - return "%s:%s%s" % (self.target_hostname, "+" if self.tls else "", - self.port) + return "IRCServer.Server(%s:%s%s)" % (self.target_hostname, + "+" if self.tls else "", self.port) def __str__(self): return repr(self) def fileno(self):