Calling theme function from variable

main
Bob Mottram 2020-05-28 10:26:30 +01:00
parent 4d4836fac0
commit 313a5131fd
1 changed files with 1 additions and 2 deletions

View File

@ -276,8 +276,7 @@ def setTheme(baseDir: str, name: str) -> bool:
themes = getThemesList() themes = getThemesList()
for themeName in themes: for themeName in themes:
if name == themeName.lower(): if name == themeName.lower():
themeFunctionName = 'setTheme' + themeName globals()['setTheme' + themeName](baseDir)
themeFunctionName(baseDir)
result = True result = True
if not result: if not result: