From 9ecbb6be7b599a279f9f0cad31da509e8da82a82 Mon Sep 17 00:00:00 2001 From: jesopo Date: Wed, 21 Nov 2018 20:16:07 +0000 Subject: [PATCH] Fix mypy issues caused by overwriting a `bytes` variable with a `str` object --- src/IRCServer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/IRCServer.py b/src/IRCServer.py index 138edf24..b52783ba 100644 --- a/src/IRCServer.py +++ b/src/IRCServer.py @@ -250,16 +250,16 @@ class Server(IRCObject.Object): for line in data_lines: encoding = self.get_setting("encoding", "utf8") try: - line = line.decode(encoding) + decoded_line = line.decode(encoding) except: self.bot.log.trace("can't decode line with '%s', falling back", [encoding]) try: - line = line.decode(self.get_setting( + decoded_line = line.decode(self.get_setting( "fallback-encoding", "latin-1")) except: continue - decoded_lines.append(line) + decoded_lines.append(decoded_line) self.last_read = time.monotonic() self.ping_sent = False