From 964efc5b4c4bd483cee1634e8a774934d5af72de Mon Sep 17 00:00:00 2001 From: Ivan Habunek Date: Tue, 2 Jan 2024 22:06:20 +0100 Subject: [PATCH] Fix bug which causes a crash if palette is not in settings --- toot/cli/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toot/cli/__init__.py b/toot/cli/__init__.py index 5cc995b..a6af85a 100644 --- a/toot/cli/__init__.py +++ b/toot/cli/__init__.py @@ -49,7 +49,8 @@ def get_default_map(): # TODO: remove in version 1.0 tui_old = settings.get("tui", {}).copy() - del tui_old["palette"] + if "palette" in tui_old: + del tui_old["palette"] if tui_old: # TODO: don't show the warning for [toot.palette] print_warning("Settings section [tui] has been deprecated in favour of [commands.tui].")