Skip to content

Commit

Permalink
Add exception info
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Jul 2, 2024
1 parent b9c4dfb commit 25d6d79
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions canopen/objectdictionary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ def export_od(
If *dest* is a filename and its extension is ``".eds"`` or ``".dcf"``,
*doc_type* defaults to that extension (the preceeding dot excluded);
else, it defaults to ``"eds"``.
:raises ValueError:
When exporting to an unknown format.
"""

opened_here = False
Expand Down Expand Up @@ -79,6 +81,10 @@ def import_od(
:param node_id:
For EDS and DCF files, the node ID to use.
For other formats, this parameter is ignored.
:raises ObjectDictionaryError:
For object dictionary errors and inconsistencies.
:raises ValueError:
When passed a file of an unknown format.
"""
if source is None:
return ObjectDictionary()
Expand Down

0 comments on commit 25d6d79

Please sign in to comment.