Browse Source

Show ImportErrors when discovering "tasks" modules in INSTALLED_APPS.

Ask Solem 15 năm trước cách đây
mục cha
commit
0c4668916b
1 tập tin đã thay đổi với 1 bổ sung4 xóa
  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.
     """
 
-    try:
-        module = __import__(app, {}, {}, [related_name])
-    except ImportError:
-        return None
+    module = __import__(app, {}, {}, [related_name])
 
     try:
         related_module = getattr(module, related_name)