Skip to content

Commit 4319d4a

Browse files
eds: use eds.get() in warning for DefaultValue/ParameterValue (mypy fix)
1 parent 4ed45dd commit 4319d4a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • canopen/objectdictionary

canopen/objectdictionary/eds.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def build_variable(
345345
except ValueError:
346346
logger.warning(
347347
"Invalid DefaultValue %r for %s (0x%X), ignoring",
348-
var.default_raw, var.name, var.index,
348+
eds.get(section, "DefaultValue"), var.name, var.index,
349349
)
350350
if eds.has_option(section, "ParameterValue"):
351351
try:
@@ -354,7 +354,7 @@ def build_variable(
354354
except ValueError:
355355
logger.warning(
356356
"Invalid ParameterValue %r for %s (0x%X), ignoring",
357-
var.value_raw, var.name, var.index,
357+
eds.get(section, "ParameterValue"), var.name, var.index,
358358
)
359359
# Factor, Description and Unit are not standard according to the CANopen specifications, but
360360
# they are implemented in the python canopen package, so we can at least try to use them

0 commit comments

Comments
 (0)