소스 검색

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.
     """
 
-    try:
-        module = __import__(app, {}, {}, [related_name])
-    except ImportError:
-        return None
+    module = __import__(app, {}, {}, [related_name])
 
     try:
         related_module = getattr(module, related_name)