Skip to content

Commit 55eaa5e

Browse files
authored
Merge pull request #383 from sourcebots/early-board-access
Catch accessing boards before wait start
2 parents 0335fc2 + 5c75d2a commit 55eaa5e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sbot/internal/board_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ def find_output(self, identifier: str, idx: int) -> OutputIdentifier:
417417
:raises KeyError: If no board with the given identifier is registered.
418418
"""
419419
assert idx >= 0, "Output identifiers must be positive"
420+
assert self.loaded, \
421+
"Boards cannot be accessed before they are loaded. Run utils.load_boards() first."
422+
420423
try:
421424
return self.outputs[identifier][idx]
422425
except IndexError:

0 commit comments

Comments
 (0)