Fix unit tests failed

if flow is None for add_tasks when running unit tests,
the method 'add' for flow  will be failed. this patch
will fix it.

Change-Id: I1bd70cea69cc54bea34de4b655f6d7caecfdf0e2
This commit is contained in:
wangyu 2019-09-12 15:51:51 +08:00
parent 4108ed8260
commit a3fcd6d6be
1 changed files with 1 additions and 0 deletions

View File

@ -323,6 +323,7 @@ class FakeFlowEngine(object):
def add_tasks(self, flow, *nodes, **kwargs):
if flow is None:
LOG.error("The flow is None, get it first")
return
flow.add(*nodes, **kwargs)
def link_task(self, flow, u, v):