From e03179744cdc45e379f52d21219737ab6157fce9 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 27 May 2020 14:05:23 +0100 Subject: [PATCH] Tidying --- theme.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/theme.py b/theme.py index a5d49e52..5e9a6fa2 100644 --- a/theme.py +++ b/theme.py @@ -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'