[core] Simplify access to commands' prefix and suffix

This commit is contained in:
Candice Bentéjac 2025-06-16 18:01:06 +02:00
parent 46936768d1
commit 3d2dfcb91e
2 changed files with 14 additions and 4 deletions

View file

@ -260,8 +260,8 @@ class Node(BaseNode):
meshroomComputeCmd += f" --iteration {chunk.range.iteration}"
runtimeEnv = chunk.node.nodeDesc.plugin.runtimeEnv
cmdPrefix = chunk.node.nodeDesc.plugin.processEnv.getCommandPrefix()
cmdSuffix = chunk.node.nodeDesc.plugin.processEnv.getCommandSuffix()
cmdPrefix = chunk.node.nodeDesc.plugin.commandPrefix
cmdSuffix = chunk.node.nodeDesc.plugin.commandSuffix
self.executeChunkCommandLine(chunk, cmdPrefix + meshroomComputeCmd + cmdSuffix, env=runtimeEnv)
@ -279,8 +279,8 @@ class CommandLineNode(BaseNode):
return MrNodeType.COMMANDLINE
def buildCommandLine(self, chunk) -> str:
cmdPrefix = chunk.node.nodeDesc.plugin.processEnv.getCommandPrefix()
cmdSuffix = chunk.node.nodeDesc.plugin.processEnv.getCommandSuffix()
cmdPrefix = chunk.node.nodeDesc.plugin.commandPrefix
cmdSuffix = chunk.node.nodeDesc.plugin.commandSuffix
if chunk.node.isParallelized and chunk.node.size > 1:
cmdSuffix = cmdSuffix + " " + self.commandLineRange.format(**chunk.range.toDict())