Fix minor code style

Change-Id: Ib051581cd820cbb478b95b1b4421adb2b577567d
This commit is contained in:
Changbin Liu
2013-07-29 18:57:59 -04:00
parent 3e5d91584a
commit 9282d3a944
2 changed files with 2 additions and 4 deletions

View File

@@ -154,9 +154,7 @@ class MemoryLogBook(logbook.LogBook):
@check_not_closed
def __contains__(self, flow_name):
if flow_name not in self._flow_names:
return False
return True
return flow_name in self._flow_names
def __delitem__(self, flow_name):
w = self[flow_name]

View File

@@ -59,7 +59,7 @@ class Flow(object):
if parents:
self.parents = tuple(parents)
else:
self.parents = tuple([])
self.parents = ()
# Any objects that want to listen when a wf/task starts/stops/completes
# or errors should be registered here. This can be used to monitor
# progress and record tasks finishing (so that it becomes possible to