Skip to content

Commit cd29b6e

Browse files
authored
Merge pull request #441 from kakoeh/fix_comparams
fix calculation of communication parameters
2 parents bac838f + 537bc12 commit cd29b6e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

odxtools/cli/_print_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
from ..description import Description
1111
from ..diaglayers.diaglayer import DiagLayer
12+
from ..diaglayers.hierarchyelement import HierarchyElement
1213
from ..diagservice import DiagService
1314
from ..parameters.codedconstparameter import CodedConstParameter
1415
from ..parameters.nrcconstparameter import NrcConstParameter
@@ -293,9 +294,9 @@ def print_dl_metrics(variants: list[DiagLayer]) -> None:
293294
all_services: list[DiagService | SingleEcuJob] = sorted(
294295
variant.services, key=lambda x: x.short_name)
295296
ddds = variant.diag_data_dictionary_spec
297+
comparam_refs = variant.comparam_refs if isinstance(variant, HierarchyElement) else []
296298

297299
# Add row to table
298300
table.add_row(variant.short_name, variant.variant_type.value, str(len(all_services)),
299-
str(len(ddds.data_object_props)),
300-
str(len(getattr(variant, "comparams_refs", []))))
301+
str(len(ddds.data_object_props)), str(len(comparam_refs)))
301302
rich_print(table)

0 commit comments

Comments
 (0)