From afda9fe95d911b61072d889153e2f3021c6b78d2 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 2 Mar 2021 02:47:08 -0500 Subject: [PATCH] fixed crashing bug on updates without text --- main_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main_controller.py b/main_controller.py index eb7719c..b666684 100644 --- a/main_controller.py +++ b/main_controller.py @@ -186,9 +186,9 @@ def update_loop(): if "weather_message" in this_game.last_update[0].keys(): state["update_emoji"] = this_game.weather.emoji - elif "ishit" in this_game.last_update[0] and this_game.last_update[0]["ishit"]: + elif "ishit" in this_game.last_update[0].keys() and this_game.last_update[0]["ishit"]: state["update_emoji"] = "🏏" - elif this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: + elif "text" in this_game.last_update[0].keys() and this_game.last_update[0]["text"] == gametext.appearance_outcomes.walk: state["update_emoji"] = "👟" else: state["update_emoji"] = "🗞"