Skip to content

Commit 054abb5

Browse files
committed
tools: ynl: make definitions optional again
definitions are optional, commit in question breaks cli for ethtool. Fixes: 6517a60 ("tools: ynl: move the enum classes to shared code") Reviewed-by: Chuck Lever <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 0d2be75 commit 054abb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/net/ynl/lib/nlspec.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,8 @@ def _dictify_ops_directional(self):
387387
def resolve(self):
388388
self.resolve_up(super())
389389

390-
for elem in self.yaml['definitions']:
390+
definitions = self.yaml.get('definitions', [])
391+
for elem in definitions:
391392
if elem['type'] == 'enum' or elem['type'] == 'flags':
392393
self.consts[elem['name']] = self.new_enum(elem)
393394
else:

0 commit comments

Comments
 (0)