From 2f55764228b281913cd99117972587ee89a10b7e Mon Sep 17 00:00:00 2001 From: buhtz Date: Thu, 22 Sep 2022 14:01:40 +0200 Subject: [PATCH] fix --- common/config.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/common/config.py b/common/config.py index af28f6412..ef1db2196 100644 --- a/common/config.py +++ b/common/config.py @@ -49,7 +49,9 @@ class Config(configfile.ConfigFileWithProfiles): APP_NAME = 'Back In Time' VERSION = '1.3.2' COPYRIGHT = 'Copyright (C) 2008-2022 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze' + CONFIG_VERSION = 6 + """Latest or highest possible version of Backin Time's config file.""" NONE = 0 AT_EVERY_BOOT = 1 @@ -195,11 +197,16 @@ def __init__(self, config_path = None, data_path = None): else: os.rename(old_path, self._LOCAL_CONFIG_PATH) + # Load global config file self.load(self._GLOBAL_CONFIG_PATH) + + # Append local config file self.append(self._LOCAL_CONFIG_PATH) - #?Internal version of current config;;self.CONFIG_VERSION - currentConfigVersion = self.intValue('config.version', 5) + # Get the version of the config file + # or assume the highest config version if it isn't set. + currentConfigVersion \ + = self.intValue('config.version', self.CONFIG_VERSION) if currentConfigVersion < self.CONFIG_VERSION: # config.version value wasn't stored since BiT version 0.9.99.22