diff --git a/data/config/layout.py b/data/config/layout.py index 89a8134f..88fdef50 100644 --- a/data/config/layout.py +++ b/data/config/layout.py @@ -36,14 +36,17 @@ def font(self, keypath): def coords(self, keypath): try: - d = self.__find_at_keypath(keypath) + coord_dict = self.__find_at_keypath(keypath) except KeyError as e: raise e - if self.state in AVAILABLE_OPTIONAL_KEYS: - if self.state in d: - return d[self.state] - return d + if not isinstance(coord_dict, dict) or not self.state in AVAILABLE_OPTIONAL_KEYS: + return coord_dict + + if self.state in coord_dict: + return coord_dict[self.state] + + return coord_dict def set_state(self, new_state=None): if new_state in AVAILABLE_OPTIONAL_KEYS: diff --git a/renderers/games/teams.py b/renderers/games/teams.py index 5bc59b76..5d7bb78f 100644 --- a/renderers/games/teams.py +++ b/renderers/games/teams.py @@ -116,7 +116,7 @@ def __render_team_text(canvas, layout, colors, team, homeaway, full_team_names, def __render_record_text(canvas, layout, colors, team, homeaway, default_colors): if "losses" not in team.record or "wins" not in team.record: return - if not layout.coords("teams.record.enabled"): + if not layout.coords("teams.record").get("enabled", False): return text_color = colors.get("text", default_colors["text"]) diff --git a/version.py b/version.py index 82b432be..6bb344b1 100644 --- a/version.py +++ b/version.py @@ -1,5 +1,5 @@ SCRIPT_NAME = "MLB LED Scoreboard" -SCRIPT_VERSION = "6.4.0" +SCRIPT_VERSION = "6.4.1" if __name__ == "__main__":