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
This commit is contained in:
Joshua Harlow
2013-12-06 19:52:52 -08:00
parent 03a205ab8f
commit bdf1bf18dc

View File

@@ -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):