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