Check if 'address' field exists before using it
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
69a48abce4
commit
97f7e89e93
4
main.py
4
main.py
@ -301,7 +301,9 @@ class Bear():
|
||||
for index in range(0, entry['number_of_elements']):
|
||||
kid = flat_entry.copy()
|
||||
kid['name'] = '{name}[{index}]'.format(name=flat_entry['name'], index=index)
|
||||
kid['address'] = hex(int(flat_entry['address'], 16) + entry['size_byte'] * index)
|
||||
|
||||
if ('address' in flat_entry) and ('size_byte' in entry):
|
||||
kid['address'] = hex(int(flat_entry['address'], 16) + entry['size_byte'] * index)
|
||||
|
||||
self.pettanko(kid)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user