Merge "Skip invariant checking and adding when nothing provided"
This commit is contained in:
@@ -37,6 +37,9 @@ class Flow(flow.Flow):
|
|||||||
|
|
||||||
def add(self, *items):
|
def add(self, *items):
|
||||||
"""Adds a given task/tasks/flow/flows to this flow."""
|
"""Adds a given task/tasks/flow/flows to this flow."""
|
||||||
|
if not items:
|
||||||
|
return self
|
||||||
|
|
||||||
# NOTE(imelnikov): we add item to the end of flow, so it should
|
# NOTE(imelnikov): we add item to the end of flow, so it should
|
||||||
# not provide anything previous items of the flow require
|
# not provide anything previous items of the flow require
|
||||||
requires = self.requires
|
requires = self.requires
|
||||||
|
|||||||
@@ -40,7 +40,10 @@ class Flow(flow.Flow):
|
|||||||
|
|
||||||
def add(self, *items):
|
def add(self, *items):
|
||||||
"""Adds a given task/tasks/flow/flows to this flow."""
|
"""Adds a given task/tasks/flow/flows to this flow."""
|
||||||
# check that items are actually independent
|
if not items:
|
||||||
|
return self
|
||||||
|
|
||||||
|
# NOTE(harlowja): check that items to be added are actually independent
|
||||||
provides = self.provides
|
provides = self.provides
|
||||||
old_requires = self.requires
|
old_requires = self.requires
|
||||||
for item in items:
|
for item in items:
|
||||||
|
|||||||
Reference in New Issue
Block a user