From 0e5d5d6218e61aa6a3ac8ddadbd0bb86f7b02aa0 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Fri, 22 Apr 2011 12:03:18 +0000 Subject: Fixed #15662 -- Made sure the module_has_submodule utility function follow correct PEP 302, passing the package as the second argument to the find_module method of the importer. Thanks, Bradley Ayers. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16075 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/module_loading.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/utils/module_loading.py') diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py index 32ca69a9fd..4b76f6cbdd 100644 --- a/django/utils/module_loading.py +++ b/django/utils/module_loading.py @@ -12,7 +12,7 @@ def module_has_submodule(package, module_name): except KeyError: pass for finder in sys.meta_path: - if finder.find_module(name): + if finder.find_module(name, package): return True for entry in package.__path__: # No __path__, then not a package. try: -- cgit v1.3