Browse Source

Task.update_state: meta should not default to {}, but None

Ask Solem 14 years ago
parent
commit
b5187b0d45
1 changed files with 1 additions and 3 deletions
  1. 1 3
      celery/task/base.py

+ 1 - 3
celery/task/base.py

@@ -591,8 +591,6 @@ class BaseTask(object):
         :param meta: State metadata (:class:`dict`).
 
         """
-        if meta is None:
-            meta = {}
         self.backend.store_result(task_id, meta, state)
 
     def on_retry(self, exc, task_id, args, kwargs, einfo=None):
@@ -681,7 +679,7 @@ class BaseTask(object):
         """repr(task)"""
         try:
             kind = self.__class__.mro()[1].__name__
-        except (AttributeError, IndexError):
+        except (AttributeError, IndexError):            # pragma: no cover
             kind = "%s(Task)" % self.__class__.__name__
         return "<%s: %s (%s)>" % (kind, self.name, self.type)