Skip to content

Commit

Permalink
ConfigHub/unlock config and friends: profile name argument no longer …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
josephsl committed Jan 26, 2021
1 parent 9e4f6a4 commit 407074e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/appModules/splstudio/splconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 407074e

Please sign in to comment.