From f27a3c237b563060c88eb613ea6831a07d791109 Mon Sep 17 00:00:00 2001 From: Gobberwart Date: Wed, 7 Sep 2016 12:06:15 +1000 Subject: [PATCH] Removed logging_handler bandaid --- pokemongo_bot/event_handlers/colored_logging_handler.py | 5 +---- pokemongo_bot/event_handlers/logging_handler.py | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pokemongo_bot/event_handlers/colored_logging_handler.py b/pokemongo_bot/event_handlers/colored_logging_handler.py index 1e9edc1510..28e9057a57 100644 --- a/pokemongo_bot/event_handlers/colored_logging_handler.py +++ b/pokemongo_bot/event_handlers/colored_logging_handler.py @@ -136,7 +136,4 @@ def handle_event(self, event, sender, level, formatted_msg, data): formatted_msg = '[{}] {}'.format(event, formatted_msg) logger = logging.getLogger(type(sender).__name__) - try: - getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8")) - except UnicodeDecodeError: - getattr(logger, level)(formatted_msg) + getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8")) diff --git a/pokemongo_bot/event_handlers/logging_handler.py b/pokemongo_bot/event_handlers/logging_handler.py index bd857d5e3e..44cdd37b81 100644 --- a/pokemongo_bot/event_handlers/logging_handler.py +++ b/pokemongo_bot/event_handlers/logging_handler.py @@ -20,7 +20,4 @@ def handle_event(self, event, sender, level, formatted_msg, data): formatted_msg = '[{}] {}'.format(event, formatted_msg) logger = logging.getLogger(type(sender).__name__) - try: - getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8")) - except UnicodeDecodeError: - getattr(logger, level)(formatted_msg) + getattr(logger, level)(formatted_msg.encode(sys.stdout.encoding, "replace").decode("utf-8"))