1 parent 82326de commit 1a1e10cCopy full SHA for 1a1e10c
2 files changed
openlcb/cdimemo.py
@@ -290,7 +290,7 @@ def addChildren(self) -> None:
290
if self.element.tail:
291
self.tail = self.element.tail
292
293
- for child_elem in list(self.element): # list() to avoid modification issues
+ for child_elem in list(self.element): # list() fixes concurrency issue
294
child_memo = CDIMemo(
295
tag=child_elem.tag,
296
element=child_elem,
openlcb/cdivar.py
@@ -181,6 +181,7 @@ def getSerializable(self):
181
elif self.className == "string":
182
return self.getString()
183
assert self.className in ("blob", "eventid", "action")
184
+ assert self.data is not None, "CDIVar data not initialized"
185
return base64.b64encode(self.data)
186
187
def getDict(self, add_name=True):
0 commit comments