浏览代码

Fixed typo in celery.loaders.base

Ask Solem 14 年之前
父节点
当前提交
bd0d8ecd4e
共有 1 个文件被更改,包括 3 次插入1 次删除
  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)