mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-10 15:29:47 +01:00
Merge pull request #457 from LoLei/456-fix-FileNotFoundError
[Bug] Fix error if theme has never been set
This commit is contained in:
commit
c18f4014f9
@ -19,8 +19,11 @@ def list_out():
|
|||||||
user_themes = [theme.name.replace(".json", "")
|
user_themes = [theme.name.replace(".json", "")
|
||||||
for theme in list_themes_user()]
|
for theme in list_themes_user()]
|
||||||
|
|
||||||
|
try:
|
||||||
last_used_theme = util.read_file(os.path.join(
|
last_used_theme = util.read_file(os.path.join(
|
||||||
CACHE_DIR, "last_used_theme"))[0].replace(".json", "")
|
CACHE_DIR, "last_used_theme"))[0].replace(".json", "")
|
||||||
|
except FileNotFoundError:
|
||||||
|
last_used_theme = ""
|
||||||
|
|
||||||
if user_themes:
|
if user_themes:
|
||||||
print("\033[1;32mUser Themes\033[0m:")
|
print("\033[1;32mUser Themes\033[0m:")
|
||||||
|
Loading…
Reference in New Issue
Block a user