mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-10 15:46:54 +02:00
[core] add quotes on strings
to deal with space characters on command line
This commit is contained in:
parent
576124a342
commit
8e1452d5bc
3 changed files with 5 additions and 3 deletions
|
@ -249,6 +249,8 @@ class Attribute(BaseObject):
|
|||
if isinstance(self.attributeDesc, desc.ChoiceParam) and not self.attributeDesc.exclusive:
|
||||
assert(isinstance(self.value, collections.Sequence) and not isinstance(self.value, basestring))
|
||||
return self.attributeDesc.joinChar.join(self.value)
|
||||
if isinstance(self.attributeDesc, (desc.StringParam, desc.File)):
|
||||
return '"{}"'.format(self.value)
|
||||
return str(self.value)
|
||||
|
||||
def isDefault(self):
|
||||
|
@ -825,7 +827,7 @@ class Node(BaseObject):
|
|||
**cmdVars)
|
||||
attr._invalidationValue = attr.attributeDesc.value.format(
|
||||
**cmdVarsNoCache)
|
||||
v = attr.value
|
||||
v = attr.getValueStr()
|
||||
|
||||
cmdVars[name] = '--{name} {value}'.format(name=name, value=v)
|
||||
cmdVars[name + 'Value'] = str(v)
|
||||
|
|
|
@ -179,7 +179,7 @@ class CameraInit(desc.CommandLineNode):
|
|||
def buildCommandLine(self, chunk):
|
||||
cmd = desc.CommandLineNode.buildCommandLine(self, chunk)
|
||||
if chunk.node.viewpointsFile:
|
||||
cmd += ' --input ' + chunk.node.viewpointsFile
|
||||
cmd += ' --input "{}"'.format(chunk.node.viewpointsFile)
|
||||
return cmd
|
||||
|
||||
def processChunk(self, chunk):
|
||||
|
|
|
@ -44,7 +44,7 @@ class SimpleFarmSubmitter(BaseSubmitter):
|
|||
|
||||
task = simpleFarm.Task(
|
||||
name=node.nodeType,
|
||||
command='meshroom_compute --node {nodeName} {meshroomFile} {parallelArgs} --extern'.format(
|
||||
command='meshroom_compute --node {nodeName} "{meshroomFile}" {parallelArgs} --extern'.format(
|
||||
nodeName=node.name, meshroomFile=meshroomFile, parallelArgs=parallelArgs),
|
||||
tags=tags,
|
||||
rezPackages=[self.MESHROOM_PACKAGE],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue