Переглянути джерело

Show ImportErrors when discovering "tasks" modules in INSTALLED_APPS.

Ask Solem 15 роки тому
батько
коміт
0c4668916b
1 змінених файлів з 1 додано та 4 видалено
  1. 1 4
      celery/discovery.py

+ 1 - 4
celery/discovery.py

@@ -13,10 +13,7 @@ def find_related_module(app, related_name):
     module in the application, and running handler' if it finds it.
     module in the application, and running handler' if it finds it.
     """
     """
 
 
-    try:
-        module = __import__(app, {}, {}, [related_name])
-    except ImportError:
-        return None
+    module = __import__(app, {}, {}, [related_name])
 
 
     try:
     try:
         related_module = getattr(module, related_name)
         related_module = getattr(module, related_name)