Fix FileNotFoundError if theme has never been set

This commit is contained in:
Lorenz Leitner 2019-10-01 16:54:53 +02:00
parent b6a11f6338
commit 4cc2dda585

View File

@ -19,8 +19,11 @@ def list_out():
user_themes = [theme.name.replace(".json", "")
for theme in list_themes_user()]
try:
last_used_theme = util.read_file(os.path.join(
CACHE_DIR, "last_used_theme"))[0].replace(".json", "")
except FileNotFoundError:
last_used_theme = ""
if user_themes:
print("\033[1;32mUser Themes\033[0m:")