summaryrefslogtreecommitdiff
path: root/django/utils/module_loading.py
diff options
context:
space:
mode:
authorWilliam Schwartz <wkschwartz@gmail.com>2021-03-26 10:14:07 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-03-26 10:17:10 +0100
commitcecdec91cf08fa8ad70a22d2a03bec3e86692350 (patch)
treeb7152979849d25a663c322293190ec82d99509ac /django/utils/module_loading.py
parent509d266c6aae5e4d5738fe2a2cba0bde581aac2b (diff)
downloaddjango-cecdec91cf08fa8ad70a22d2a03bec3e86692350.tar.gz
Refs #32355 -- Corrected comments about Python's _NamespacePath.
_NamespacePath supports indexing in Python 3.8+.
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 9f58c06856..8c798f69bb 100644
--- a/django/utils/module_loading.py
+++ b/django/utils/module_loading.py
@@ -85,7 +85,7 @@ def module_dir(module):
Raise ValueError otherwise, e.g. for namespace packages that are split
over several directories.
"""
- # Convert to list because _NamespacePath does not support indexing.
+ # Convert to list because __path__ may not support indexing.
paths = list(getattr(module, '__path__', []))
if len(paths) == 1:
return paths[0]