Commit 766d1bdc authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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/20230223183141.1422857-1-kuba@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents ac3ad195 d77e7ece
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
__pycache__/
+1 −3
Original line number Diff line number Diff line
@@ -3,7 +3,6 @@
import collections
import importlib
import os
import traceback
import yaml


@@ -234,8 +233,7 @@ class SpecFamily(SpecElement):
                resolved.append(elem)

            if len(resolved) == 0:
                traceback.print_exception(last_exception)
                raise Exception("Could not resolve any spec element, infinite loop?")
                raise last_exception

    def new_attr_set(self, elem):
        return SpecAttrSet(self, elem)
+1 −1
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ class Struct:
        max_val = 0
        self.attr_max_val = None
        for name, attr in self.attr_list:
            if attr.value > max_val:
            if attr.value >= max_val:
                max_val = attr.value
                self.attr_max_val = attr
            self.attrs[name] = attr