Skip to content

Commit 8f160a0

Browse files
committed
check if subtype is valid
1 parent 22b97b5 commit 8f160a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pydra/engine/workers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,12 @@ def __init__(self, subtype, **kwargs):
909909
raise
910910
logger.debug("Initialize PsijWorker")
911911
self.psij = psij
912+
913+
# Check if the provided subtype is valid
914+
valid_subtypes = ["local", "slurm"]
915+
if subtype not in valid_subtypes:
916+
raise ValueError(f"Invalid 'subtype' provided. Available options: {', '.join(valid_subtypes)}")
917+
912918
self.subtype = subtype
913919

914920
def run_el(self, interface, rerun=False, **kwargs):

0 commit comments

Comments
 (0)