diff --git a/taskflow/task.py b/taskflow/task.py index a3d54e9a..287a7d74 100644 --- a/taskflow/task.py +++ b/taskflow/task.py @@ -144,8 +144,7 @@ class BaseTask(atom.Atom): :return: the copied task """ c = copy.copy(self) - c._events_listeners = c._events_listeners.copy() - c._events_listeners.clear() + c._events_listeners = collections.defaultdict(list) if retain_listeners: for event_name, listeners in six.iteritems(self._events_listeners): c._events_listeners[event_name] = listeners[:]