Skip to content
Merged
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
18 changes: 2 additions & 16 deletions nipype/pipeline/engine/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,20 +834,6 @@ def _check_is_already_connected(workflow, node, attrname):

return True

def _get_parameter_node(self, parameter, subtype="in"):
"""Returns the underlying node corresponding to an input or
output parameter
"""
if subtype == "in":
subobject = self.inputs
else:
subobject = self.outputs
attrlist = parameter.split(".")
cur_out = subobject
for attr in attrlist[:-1]:
cur_out = getattr(cur_out, attr)
return cur_out.traits()[attrlist[-1]].node

def _check_outputs(self, parameter):
return self._has_attr(parameter, subtype="out")

Expand Down Expand Up @@ -976,7 +962,7 @@ def _generate_flatgraph(self):
logger.debug("in: connections-> %s", str(d["connect"]))
for cd in deepcopy(d["connect"]):
logger.debug("in: %s", str(cd))
dstnode = node._get_parameter_node(cd[1], subtype="in")
dstnode = node.get_node(cd[1].rsplit(".", 1)[0])
srcnode = u
srcout = cd[0]
dstin = cd[1].split(".")[-1]
Expand All @@ -996,7 +982,7 @@ def _generate_flatgraph(self):
parameter = cd[0][0]
else:
parameter = cd[0]
srcnode = node._get_parameter_node(parameter, subtype="out")
srcnode = node.get_node(parameter.rsplit(".", 1)[0])
if isinstance(cd[0], tuple):
srcout = list(cd[0])
srcout[0] = parameter.split(".")[-1]
Expand Down