浏览代码

Tests: import_all_modules now ignores OSError

Ask Solem 9 年之前
父节点
当前提交
990a04615a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      celery/tests/__init__.py

+ 5 - 0
celery/tests/__init__.py

@@ -90,3 +90,8 @@ def import_all_modules(name=__name__, file=__file__,
                 import_module(module)
             except ImportError:
                 pass
+            except OSError as exc:
+                warnings.warn(UserWarning(
+                    'Ignored error importing module {0}: {1!r}').format(
+                        module, exc,
+                    ))