X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/0366f081ce7414c7e6a7cdffffe236cf0cdee400..2bfb909dde1241111ab5568f30c45d2644bdaf25:/lunaix-os/scripts/build-tools/shared/shconfig/commands.py diff --git a/lunaix-os/scripts/build-tools/shared/shconfig/commands.py b/lunaix-os/scripts/build-tools/shared/shconfig/commands.py index 911fadd..8c4e670 100644 --- a/lunaix-os/scripts/build-tools/shared/shconfig/commands.py +++ b/lunaix-os/scripts/build-tools/shared/shconfig/commands.py @@ -5,7 +5,7 @@ from .common import CmdTable, ShconfigException from .common import select, cmd from lcfg2.config import ConfigEnvironment -from lcfg2.common import NodeProperty, NodeDependency +from lcfg2.common import NodeProperty, NodeDependency, ConfigNodeError class Commands(CmdTable): def __init__(self, env: ConfigEnvironment): @@ -84,8 +84,14 @@ class Commands(CmdTable): if node is None: raise ShconfigException(f"no such config: {name}") - NodeProperty.Value[node] = value - self.__env.refresh() + if NodeProperty.Readonly[node]: + raise ShconfigException(f"node is read only") + + try: + NodeProperty.Value[node] = value + self.__env.refresh() + except ConfigNodeError as e: + print(e) @cmd("dep") def __fn_dep(self, name: str):