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

fix(api): OT-2 attempting to connect modules via temporary ports #15134

Merged
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
6 changes: 4 additions & 2 deletions api/src/opentrons/hardware_control/module_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
log = logging.getLogger(__name__)

MODULE_PORT_REGEX = re.compile(
# add a negative lookbehind to suppress matches on OT-2 tempfiles udev creates
r"(?<!\.#ot_module_)"
# capture all modules by name using alternation
"(" + "|".join(modules.MODULE_TYPE_BY_NAME.keys()) + ")"
# add a negative lookahead to suppress matches on tempfiles udev creates
+ "(" + "|".join(modules.MODULE_TYPE_BY_NAME.keys()) + ")"
# add a negative lookahead to suppress matches on Flex tempfiles udev creates
+ r"\d+(?!\.tmp-c\d+:\d+)",
re.I,
)
Expand Down
Loading