Skip to content

Commit 766d1bd

Browse files
committed
Merge branch 'tools-ynl-gen-fix-glitches-found-by-chuck'
Jakub Kicinski says: ==================== tools: ynl-gen: fix glitches found by Chuck A handful of fixes Chuck run into while trying to define the family for crypto handshakes. ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents ac3ad19 + d77e7ec commit 766d1bd

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

tools/net/ynl/lib/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__/

tools/net/ynl/lib/nlspec.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import collections
44
import importlib
55
import os
6-
import traceback
76
import yaml
87

98

@@ -234,8 +233,7 @@ def __init__(self, spec_path, schema_path=None):
234233
resolved.append(elem)
235234

236235
if len(resolved) == 0:
237-
traceback.print_exception(last_exception)
238-
raise Exception("Could not resolve any spec element, infinite loop?")
236+
raise last_exception
239237

240238
def new_attr_set(self, elem):
241239
return SpecAttrSet(self, elem)

tools/net/ynl/ynl-gen-c.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ def __init__(self, family, space_name, type_list=None, inherited=None):
546546
max_val = 0
547547
self.attr_max_val = None
548548
for name, attr in self.attr_list:
549-
if attr.value > max_val:
549+
if attr.value >= max_val:
550550
max_val = attr.value
551551
self.attr_max_val = attr
552552
self.attrs[name] = attr

0 commit comments

Comments
 (0)