Selaa lähdekoodia

Fixed typo in celery.loaders.base

Ask Solem 14 vuotta sitten
vanhempi
commit
bd0d8ecd4e
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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.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
         located in the current directory.
 
         Modules located in the current directory has
         precedence over modules located in ``sys.path``.
         """
+        if imp is None:
+            imp = self.import_module
         cwd = os.getcwd()
         if cwd in sys.path:
             return imp(module)