Skip to content
Open
Show file tree
Hide file tree
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: 6 additions & 1 deletion commands2/parallelcommandgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ 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 in_common]
)
raise IllegalCommandUse(
"Multiple commands in a parallel composition cannot require the same subsystems.",
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
f" Multiple commands in a parallel composition cannot require the same subsystems.",
common=in_common,
)

Expand Down
7 changes: 6 additions & 1 deletion commands2/paralleldeadlinegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,13 @@ 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 in_common]
)
raise IllegalCommandUse(
"Multiple commands in a parallel composition cannot require the same subsystems.",
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
f" Multiple commands in a parallel composition cannot require the same subsystems.",
common=in_common,
)

Expand Down
7 changes: 6 additions & 1 deletion commands2/parallelracegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,13 @@ 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 in_common]
)
raise IllegalCommandUse(
"Multiple commands in a parallel composition cannot require the same subsystems.",
f"Command {command.getName()} could not be added to this ParallelCommandGroup"
f" because the subsystems [{requirements_str}] are already required in this command."
f" Multiple commands in a parallel composition cannot require the same subsystems.",
common=in_common,
)

Expand Down