main
Bob Mottram 2020-05-27 14:05:23 +01:00
parent ea1bf2caa3
commit e03179744c
1 changed files with 5 additions and 7 deletions

View File

@ -24,13 +24,11 @@ def setThemeInConfig(baseDir: str, name: str) -> bool:
def getTheme(baseDir: str) -> str:
configFilename = baseDir + '/config.json'
if not os.path.isfile(configFilename):
return 'default'
configJson = loadJson(configFilename, 0)
if not configJson:
return 'default'
if configJson.get('theme'):
return configJson['theme']
if os.path.isfile(configFilename):
configJson = loadJson(configFilename, 0)
if configJson:
if configJson.get('theme'):
return configJson['theme']
return 'default'