Ask Solem преди 14 години
родител
ревизия
afc93f24dc
променени са 3 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 3 3
      celery/log.py
  2. 2 2
      celery/signals.py
  3. 2 1
      celery/tests/test_task/test_task.py

+ 3 - 3
celery/log.py

@@ -42,9 +42,9 @@ class ColorFormatter(logging.Formatter):
         if self.use_color and color:
             try:
                 record.msg = color(safe_str(record.msg))
-            except Exception, exc:
-                record.msg = "<Unrepresentable %r: %r>" % (type(record.msg),
-                                                           traceback.format_stack())
+            except Exception:
+                record.msg = "<Unrepresentable %r: %r>" % (
+                        type(record.msg), traceback.format_stack())
 
         # Very ugly, but have to make sure processName is supported
         # by foreign logger instances.

+ 2 - 2
celery/signals.py

@@ -3,8 +3,8 @@
 celery.signals
 ==============
 
-Signals allows decoupled applications to receive notifications when certain actions
-occur.
+Signals allows decoupled applications to receive notifications when
+certain actions occur elsewhere in the application.
 
 :copyright: (c) 2009 - 2011 by Ask Solem.
 :license: BSD, see LICENSE for more details.

+ 2 - 1
celery/tests/test_task/test_task.py

@@ -438,9 +438,10 @@ class TestTaskSet(unittest.TestCase):
     def test_named_taskset(self):
         prefix = "test_named_taskset-"
         ts = task.TaskSet([return_True_task.subtask([1])])
-        res = ts.apply(taskset_id=prefix+gen_unique_id())
+        res = ts.apply(taskset_id=prefix + gen_unique_id())
         self.assertTrue(res.taskset_id.startswith(prefix))
 
+
 class TestTaskApply(unittest.TestCase):
 
     def test_apply_throw(self):