Skip to content

Commit e2c1844

Browse files
bors[bot]jannic
andauthored
Merge #124
124: Fix UnboundLocalError in patch.py r=adamgreig a=jannic Fixes this error message: ``` File "/home/jan/.local/lib/python3.7/site-packages/svdtools/patch.py", line 855, in derive_register description = rmod.get(description, None) UnboundLocalError: local variable 'description' referenced before assignment ``` Co-authored-by: Jan Niehusmann <[email protected]>
2 parents 5921b40 + 3b91aa3 commit e2c1844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

svdtools/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ def derive_register(self, rname, rmod):
852852
elif isinstance(rmod, dict):
853853
rderive = rmod["_from"]
854854
address_offset = rmod.get("addressOffset", None)
855-
description = rmod.get(description, None)
855+
description = rmod.get("description", None)
856856
else:
857857
raise SvdPatchError(f"derive: incorrect syntax for {rname}")
858858
rtag = parent.find(f"./register[name='{rname}']")

0 commit comments

Comments
 (0)