mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 02:08:08 +02:00
[core] Check a graph exists before accessing its name
If the graph does not exist, return "UNDEFINED" as its name.
This commit is contained in:
parent
6579ed3797
commit
909f38ccb8
1 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,8 @@ class Attribute(BaseObject):
|
|||
|
||||
def getFullNameToGraph(self):
|
||||
""" Name inside the Graph: graphName.nodeName.groupName.name """
|
||||
return '{}.{}'.format(self.node.graph.name, self.getFullNameToNode())
|
||||
graphName = self.node.graph.name if self.node.graph else "UNDEFINED"
|
||||
return '{}.{}'.format(graphName, self.getFullNameToNode())
|
||||
|
||||
def asLinkExpr(self):
|
||||
""" Return link expression for this Attribute """
|
||||
|
@ -124,7 +125,8 @@ class Attribute(BaseObject):
|
|||
|
||||
def getFullLabelToGraph(self):
|
||||
""" Label inside the Graph: graphName nodeLabel groupLabel Label """
|
||||
return '{} {}'.format(self.node.graph.name, self.getFullLabelToNode())
|
||||
graphName = self.node.graph.name if self.node.graph else "UNDEFINED"
|
||||
return '{} {}'.format(graphName, self.getFullLabelToNode())
|
||||
|
||||
def getEnabled(self):
|
||||
if isinstance(self.desc.enabled, types.FunctionType):
|
||||
|
|
Loading…
Add table
Reference in a new issue