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:
Jordan Yates 2021-04-17 17:03:49 +10:00 committed by Ioannis Glaropoulos
commit 371a83b9d9

View file

@ -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