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

[commands] Clarified error messages for parallel composition commands #73

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Formatting, made requirements error more specific
  • Loading branch information
Daniel1464 committed Oct 6, 2024
commit fd26e1457e9b5aecd956ce46312e32c70e797a78
4 changes: 3 additions & 1 deletion commands2/parallelcommandgroup.py
Original file line number Diff line number Diff line change
@@ -49,7 +49,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
4 changes: 3 additions & 1 deletion commands2/paralleldeadlinegroup.py
Original file line number Diff line number Diff line change
@@ -85,7 +85,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
4 changes: 3 additions & 1 deletion commands2/parallelracegroup.py
Original file line number Diff line number Diff line change
@@ -51,7 +51,9 @@ def addCommands(self, *commands: Command):
for command in commands:
in_common = command.getRequirements().intersection(self.requirements)
if in_common:
requirements_str = ", ".join([s.getName() for s in command.getRequirements()])
requirements_str = ", ".join(
[s.getName() for s in in_common]
)
raise IllegalCommandUse(
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
Loading
Oops, something went wrong.