summaryrefslogtreecommitdiff
path: root/django/utils/module_loading.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-07-10 20:01:12 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-07-10 20:01:12 +0000
commit4c5c8dca315058e2400104be0438af22a3ed61cf (patch)
treefc30580a0695192bd4bed09121dc664c95eb0419 /django/utils/module_loading.py
parent723b5747933f8519708a1b75e1c01478151dec33 (diff)
Properly implement PEP 302 in the module_loading module. For unknown reasons this doesn't actually raise an error under CPython, but PyPy does, and the currently implementation is clearly in violation of the PEP, which states that finder.find_module's second argument is either None or package.__path__ and imp.find_module whose second argument should be either None or a list of paths.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/utils/module_loading.py')
-rw-r--r--django/utils/module_loading.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/module_loading.py b/django/utils/module_loading.py
index 4b76f6cbdd..26a7e51e0d 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, package):
+ if finder.find_module(name, package.__path__):
return True
for entry in package.__path__: # No __path__, then not a package.
try: