Improved internal settings
This commit is contained in:
@@ -7,18 +7,11 @@ from cpl_cli.cli_settings_name_enum import CLISettingsNameEnum
|
||||
|
||||
|
||||
class CLISettings(ConfigurationModelABC):
|
||||
def __init__(self):
|
||||
def __init__(self, pip_path: str = None):
|
||||
ConfigurationModelABC.__init__(self)
|
||||
|
||||
self._pip_path: Optional[str] = None
|
||||
self._pip_path: Optional[str] = pip_path
|
||||
|
||||
@property
|
||||
def pip_path(self) -> str:
|
||||
return self._pip_path
|
||||
|
||||
def from_dict(self, settings: dict):
|
||||
try:
|
||||
self._pip_path = settings[CLISettingsNameEnum.pip_path.value]
|
||||
except Exception as e:
|
||||
Console.error(f"[ ERROR ] [ {__name__} ]: Reading error in {type(self).__name__} settings")
|
||||
Console.error(f"[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}")
|
||||
|
||||
Reference in New Issue
Block a user