Skip to content

Commit

Permalink
Add error message on missing data when using the replayhelper
Browse files Browse the repository at this point in the history
Signed-off-by: Nathaniel Mitchell <[email protected]>
  • Loading branch information
npmitche committed Dec 16, 2024
1 parent c3c11d8 commit e8a7428
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chipsec/helper/replay/replayhelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ def _get_element(self, cmd: str, args: Tuple) -> Optional[Any]:
targs = str(args)
if str(cmd) in self._data:
if targs in self._data[str(cmd)]:
return self._data[cmd][targs].pop()
try:
return self._data[cmd][targs].pop()
except IndexError as err:
logger().log_error(f'Ran out of entries for {str(cmd)} {targs}')
raise err
logger().log_error(f"Missing entry for {str(cmd)} {targs}")
return None

Expand Down

0 comments on commit e8a7428

Please sign in to comment.