Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: session: load the user script after the board is constructed #1561

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pyocd/core/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,17 @@ def __init__(
self._configure_logging()

# Bail early if we weren't provided a probe.
# TODO Should the user script still be loaded?
if probe is None:
self._board = None
return

# Load the user script.
self._load_user_script()

# Ask the probe if it has an associated board, and if not then we create a generic one.
self._board = probe.create_associated_board() or Board(self)

# Load the user script.
self._load_user_script()

def _get_config(self) -> Dict[str, Any]:
# Load config file if one was provided via options, and no_config option was not set.
if not self.options.get('no_config'):
Expand Down