Explorar el Código

Fixed typo in celery.loaders.base

Ask Solem hace 14 años
padre
commit
bd0d8ecd4e
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      celery/loaders/base.py

+ 3 - 1
celery/loaders/base.py

@@ -55,13 +55,15 @@ class BaseLoader(object):
             self.worker_initialized = True
             self.worker_initialized = True
             self.on_worker_init()
             self.on_worker_init()
 
 
-    def import_from_cwd(self, module, imp=import_module):
+    def import_from_cwd(self, module, imp=None):
         """Import module, but make sure it finds modules
         """Import module, but make sure it finds modules
         located in the current directory.
         located in the current directory.
 
 
         Modules located in the current directory has
         Modules located in the current directory has
         precedence over modules located in ``sys.path``.
         precedence over modules located in ``sys.path``.
         """
         """
+        if imp is None:
+            imp = self.import_module
         cwd = os.getcwd()
         cwd = os.getcwd()
         if cwd in sys.path:
         if cwd in sys.path:
             return imp(module)
             return imp(module)