Fix bug which causes a crash if palette is not in settings

pull/456/head
Ivan Habunek 2024-01-02 22:06:20 +01:00
rodzic 081bc0459e
commit 964efc5b4c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: F5F0623FF5EBCB3D
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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].")