From ccc832649582dd4f94262818080e2474df2b2548 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Thu, 26 Aug 2021 15:28:37 +0000 Subject: [PATCH] Revert "clean up logs" This reverts commit 1bbbaa5f4e00d8ed8bc4d8de690dce52284521db --- bot.py | 12 +++++------- symbol_router.py | 5 +---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bot.py b/bot.py index 06e8948..e77b6cf 100644 --- a/bot.py +++ b/bot.py @@ -161,13 +161,11 @@ def symbol_detect(update: Update, context: CallbackContext): Runs on any message that doesn't have a command and searches for symbols, then returns the prices of any symbols found. """ - try: - message = update.message.text - chat_id = update.message.chat_id - symbols = s.find_symbols(message) - except AttributeError as ex: - info(ex) - return + + message = update.message.text + chat_id = update.message.chat_id + symbols = s.find_symbols(message) + if symbols: # Let user know bot is working context.bot.send_chat_action(chat_id=chat_id, action=telegram.ChatAction.TYPING) diff --git a/symbol_router.py b/symbol_router.py index 9fef243..dad9a82 100644 --- a/symbol_router.py +++ b/symbol_router.py @@ -51,10 +51,7 @@ class Router: symbols.append(Coin(coin.lower())) else: info(f"{coin} is not in list of coins") - - if symbols: - info(symbols) - + info(symbols) return symbols def status(self, bot_resp) -> str: