From 38630cd1c14ef8ba6911680375a59d70fb570849 Mon Sep 17 00:00:00 2001 From: Ioannis Mourginakis Date: Wed, 25 Oct 2023 09:13:13 -0700 Subject: [PATCH] rename vars to fix mypy incompatible types error --- node_monitor/node_monitor.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/node_monitor/node_monitor.py b/node_monitor/node_monitor.py index ec126f38..94f6dc8b 100644 --- a/node_monitor/node_monitor.py +++ b/node_monitor/node_monitor.py @@ -119,16 +119,16 @@ def broadcast_alerts(self) -> None: if self.slack_bot is not None: channel_name = channels[node_provider_id]['slack_channel_name'] logging.info(f"Sending alert slack message to {channel_name}...") - err = self.slack_bot.send_message(channel_name, message) - if err is not None: - logging.error(f"SlackBot.send_message() failed with error: {err}") + err1 = self.slack_bot.send_message(channel_name, message) + if err1 is not None: + logging.error(f"SlackBot.send_message() failed with error: {err1}") if preferences['notify_telegram_chat'] == True: if self.telegram_bot is not None: chat_id = channels[node_provider_id]['telegram_chat_id'] logging.info(f"Sending alert telegram message to {chat_id}...") - err = self.telegram_bot.send_message(chat_id, message) - if err is not None: - logging.error(f"TelegramBot.send_message() failed with error: {err}") + err2 = self.telegram_bot.send_message(chat_id, message) + if err2 is not None: + logging.error(f"TelegramBot.send_message() failed with error: {err2}") # - - - - - - - - - - - - - - - - - @@ -162,16 +162,16 @@ def broadcast_status_report(self) -> None: if self.slack_bot is not None: channel_name = channels[node_provider_id]['slack_channel_name'] logging.info(f"Sending status report slack message to {channel_name}...") - err = self.slack_bot.send_message(channel_name, message) - if err is not None: - logging.error(f"SlackBot.send_message() failed with error: {err}") + err1 = self.slack_bot.send_message(channel_name, message) + if err1 is not None: + logging.error(f"SlackBot.send_message() failed with error: {err1}") if preferences['notify_telegram_chat'] == True: if self.telegram_bot is not None: chat_id = channels[node_provider_id]['telegram_chat_id'] logging.info(f"Sending status report telegram message to {chat_id}...") - err = self.telegram_bot.send_message(chat_id, message) - if err is not None: - logging.error(f"TelegramBot.send_message() failed with error: {err}") + err2 = self.telegram_bot.send_message(chat_id, message) + if err2 is not None: + logging.error(f"TelegramBot.send_message() failed with error: {err2}") # - - - - - - - - - - - - - - - - -