mirror of https://gitlab.com/bashrc2/epicyon
Use default theme if theme function not found
parent
3f4d72c6e0
commit
933c3d965f
11
theme.py
11
theme.py
|
@ -1404,7 +1404,16 @@ def setTheme(baseDir: str, name: str, domain: str) -> bool:
|
|||
for themeName in themes:
|
||||
themeNameLower = themeName.lower()
|
||||
if name == themeNameLower:
|
||||
globals()['setTheme' + themeName](baseDir)
|
||||
themeFunctionExists = False
|
||||
try:
|
||||
globals()['setTheme' + themeName](baseDir)
|
||||
themeFunctionExists = True
|
||||
except BaseException:
|
||||
pass
|
||||
|
||||
if not themeFunctionExists:
|
||||
setThemeDefault(baseDir)
|
||||
|
||||
if prevThemeName:
|
||||
if prevThemeName.lower() != themeNameLower:
|
||||
# change the banner and profile image
|
||||
|
|
Loading…
Reference in New Issue