diff options
author | Jakub Kicinski <kuba@kernel.org> | 2025-07-10 10:51:15 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2025-07-13 23:00:37 +0100 |
commit | b06c4311711c57c5e558bd29824b08f0a6e2a155 (patch) | |
tree | 348477706504344cce645de71f1e8472e8e6f173 /tools/net/ynl/pyynl/cli.py | |
parent | 9eb73f92a0b003f2fb9091085c51a4a4554c887d (diff) |
tools: ynl: default to --process-unknown in installed mode
We default to raising an exception when unknown attrs are found
to make sure those are noticed during development.
When YNL CLI is "installed" and used by sysadmins erroring out
is not going to be helpful. It's far more likely the user space
is older than the kernel in that case, than that some attr is
misdefined or missing.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Donald Hunter <donald.hunter@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/net/ynl/pyynl/cli.py')
-rwxr-xr-x | tools/net/ynl/pyynl/cli.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/net/ynl/pyynl/cli.py b/tools/net/ynl/pyynl/cli.py index 33ccc5c1843b..8c192e900bd3 100755 --- a/tools/net/ynl/pyynl/cli.py +++ b/tools/net/ynl/pyynl/cli.py @@ -113,6 +113,8 @@ def main(): spec = f"{spec_dir()}/{args.family}.yaml" if args.schema is None and spec.startswith(sys_schema_dir): args.schema = '' # disable schema validation when installed + if args.process_unknown is None: + args.process_unknown = True else: spec = args.spec if not os.path.isfile(spec): |