scripts: gen_handles.py: initialize handle.device
Initialize `handle.device` to `None` so that the assert after the matching has a chance to catch errors. Without this, a failed match will raise an exception on the line above as it attempts to get a property that doesn't exist. Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
This commit is contained in:
parent
29c838ed1d
commit
371a83b9d9
1 changed files with 1 additions and 0 deletions
|
@ -211,6 +211,7 @@ def main():
|
|||
|
||||
used_nodes = set()
|
||||
for handle in handles:
|
||||
handle.device = None
|
||||
for device in devices:
|
||||
if handle.addr == device.obj_handles:
|
||||
handle.device = device
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue