aboutsummaryrefslogtreecommitdiff
path: root/tools/net/ynl/lib/ynl.py
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-04-25 17:31:11 -0700
committerJakub Kicinski <[email protected]>2024-04-26 17:35:03 -0700
commit5c4c0edca68a5841a8d53ccd49596fe199c8334c (patch)
tree8616634cf90437e6b1e84b3e092356be32a64935 /tools/net/ynl/lib/ynl.py
parentff9ddaa416d06b2068e524356dfc9d15f84ab62f (diff)
tools: ynl: don't append doc of missing type directly to the type
When using YNL in tests appending the doc string to the type name makes it harder to check that we got the correct error. Put the doc under a separate key. Reviewed-by: Donald Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/net/ynl/lib/ynl.py')
-rw-r--r--tools/net/ynl/lib/ynl.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/net/ynl/lib/ynl.py b/tools/net/ynl/lib/ynl.py
index 35f82a2c2247..35e666928119 100644
--- a/tools/net/ynl/lib/ynl.py
+++ b/tools/net/ynl/lib/ynl.py
@@ -233,10 +233,9 @@ class NlMsg:
miss_type = self.extack['miss-type']
if miss_type in attr_space.attrs_by_val:
spec = attr_space.attrs_by_val[miss_type]
- desc = spec['name']
+ self.extack['miss-type'] = spec['name']
if 'doc' in spec:
- desc += f" ({spec['doc']})"
- self.extack['miss-type'] = desc
+ self.extack['miss-type-doc'] = spec['doc']
def _decode_policy(self, raw):
policy = {}