summaryrefslogtreecommitdiff
path: root/taskflow/patterns/graph_flow.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2013-12-06 19:52:52 -0800
committerJoshua Harlow <harlowja@yahoo-inc.com>2013-12-06 19:52:52 -0800
commitbdf1bf18dc02da6ae1dfd6dd8242f56602c6ab04 (patch)
tree6290c3bd20b67eb5c06f70a8c87b9685609a69c9 /taskflow/patterns/graph_flow.py
parent03a205ab8faf74715162a73ee95d193c90c84dd6 (diff)
downloadtaskflow-bdf1bf18dc02da6ae1dfd6dd8242f56602c6ab04.tar.gz
Don't forget to return self
To retain the functionality where we can chain function calls to add, link we need to return the object we are acting on (instead of none). Change-Id: Iadf0f9d3a21b6d079c1edd29063196180f5222ed
Diffstat (limited to 'taskflow/patterns/graph_flow.py')
-rw-r--r--taskflow/patterns/graph_flow.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/taskflow/patterns/graph_flow.py b/taskflow/patterns/graph_flow.py
index db56ec6..56c77b5 100644
--- a/taskflow/patterns/graph_flow.py
+++ b/taskflow/patterns/graph_flow.py
@@ -204,12 +204,14 @@ class TargetedFlow(Flow):
super(TargetedFlow, self).add(*items)
# reset cached subgraph, in case it was affected
self._subgraph = None
+ return self
def link(self, u, v):
"""Link existing node u as a runtime dependency of existing node v."""
super(TargetedFlow, self).link(u, v)
# reset cached subgraph, in case it was affected
self._subgraph = None
+ return self
@property
def graph(self):