From 407074e8883ff70b645cb3fd4648cbb9a79b38f4 Mon Sep 17 00:00:00 2001 From: Joseph Lee Date: Tue, 26 Jan 2021 09:29:43 -0800 Subject: [PATCH] ConfigHub/unlock config and friends: profile name argument no longer takes None as an argument. ConfigHub's unlock/validate/extran init steps methods no longer take None as a profile name - default is an empty string. This will be backported to lTS20 for consistency. --- addon/appModules/splstudio/splconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addon/appModules/splstudio/splconfig.py b/addon/appModules/splstudio/splconfig.py index b4606d39d..523e55838 100755 --- a/addon/appModules/splstudio/splconfig.py +++ b/addon/appModules/splstudio/splconfig.py @@ -215,7 +215,7 @@ def instantSwitchProfileActive(self) -> bool: # 7.0: Allow new profile settings to be overridden by a parent profile. # 8.0: Don't validate profiles other than normal profile in the beginning. def _unlockConfig( - self, path: str, profileName: Optional[str] = None, prefill: bool = False, + self, path: str, profileName: str = "", prefill: bool = False, parent: Optional[dict[Any, Any]] = None, validateNow: bool = False ) -> ConfigObj: # 21.03/20.09.6-LTS: profile name should be defined to help config status dictionary. @@ -264,7 +264,7 @@ def _unlockConfig( # Config validation. # Separated from unlock routine in 8.0. def _validateConfig( - self, SPLConfigCheckpoint: ConfigObj, profileName: Optional[str] = None, prefill: bool = False + self, SPLConfigCheckpoint: ConfigObj, profileName: str = "", prefill: bool = False ) -> None: global _configLoadStatus configTest = SPLConfigCheckpoint.validate(_val, copy=prefill, preserve_errors=True) @@ -295,7 +295,7 @@ def _validateConfig( _configLoadStatus[profileName] = "partialReset" # Extra initialization steps such as converting value types. - def _extraInitSteps(self, conf: ConfigObj, profileName: Optional[str] = None) -> None: + def _extraInitSteps(self, conf: ConfigObj, profileName: str = "") -> None: global _configLoadStatus columnOrder = conf["ColumnAnnouncement"]["ColumnOrder"] # Catch suttle errors.