Browse Source

fix import error in python 2.5

Iurii Kriachko 13 years ago
parent
commit
d1f88a739d
1 changed files with 5 additions and 5 deletions
  1. 5 5
      celery/app/__init__.py

+ 5 - 5
celery/app/__init__.py

@@ -18,8 +18,8 @@ import threading
 from .. import registry
 from ..utils import cached_property, instantiate
 
-from . import annotations
-from . import base
+from .annotations import _first_match, _first_match_any
+from .base import BaseApp
 
 
 class _TLS(threading.local):
@@ -63,7 +63,7 @@ def _unpickle_app(cls, pickler, *args):
     return pickler()(cls, *args)
 
 
-class App(base.BaseApp):
+class App(BaseApp):
     """Celery Application.
 
     :param main: Name of the main module if running as `__main__`.
@@ -192,10 +192,10 @@ class App(base.BaseApp):
 
     def annotate_task(self, task):
         if self.annotations:
-            match = annotations._first_match(self.annotations, task)
+            match = _first_match(self.annotations, task)
             for attr, value in (match or {}).iteritems():
                 setattr(task, attr, value)
-            match_any = annotations._first_match_any(self.annotations)
+            match_any = _first_match_any(self.annotations)
             for attr, value in (match_any or {}).iteritems():
                 setattr(task, attr, value)