Skip to content

Commit c653378

Browse files
committed
Remove leftover type check in _encode_to_eds().
This is no longer necessary since the function is (again) not called for the limit values.
1 parent f757937 commit c653378

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • canopen/objectdictionary

‎canopen/objectdictionary/eds.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def _decode_from_eds(node_id: int, var_type: int, value: Any) -> Any:
259259
def _encode_to_eds(var_type: int, value: Any) -> Any:
260260
if value is None:
261261
return None
262-
if var_type in (datatypes.OCTET_STRING, datatypes.DOMAIN) and isinstance(value, bytes):
262+
if var_type in (datatypes.OCTET_STRING, datatypes.DOMAIN):
263263
return bytes.hex(value)
264264
elif var_type in (datatypes.VISIBLE_STRING, datatypes.UNICODE_STRING):
265265
return value

0 commit comments

Comments
 (0)