Skip to content

Commit

Permalink
Fix issue with adding PDO parameter #25
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinse committed May 21, 2024
1 parent d2cb865 commit 43e6711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/objdictgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from objdictgen.node import Node
from objdictgen.nodemanager import NodeManager

__version__ = "3.4"
__version__ = "3.5a1"

# Shortcuts
LoadFile = Node.LoadFile
Expand Down
10 changes: 7 additions & 3 deletions src/objdictgen/nodemanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,13 @@ def ManageEntriesOfCurrent(self, addinglist: list[int], removinglist: list[int],
node.AddEntry(index, 1, default)
# Second case entry is a record
else:
# FIXME: How to retrieve the number of subentries?
for i in range(1, node.GetSubentryLength(index) + 1):
subentry_infos = node.GetSubentryInfos(index, i)
i = 0
while True:
try:
i += 1
subentry_infos = node.GetSubentryInfos(index, i)
except ValueError:
break
if "default" in subentry_infos:
default = subentry_infos["default"]
else:
Expand Down

0 comments on commit 43e6711

Please sign in to comment.