summaryrefslogtreecommitdiff
path: root/django/apps/config.py
diff options
context:
space:
mode:
authorCaio Ariede <caio.ariede@gmail.com>2015-08-23 21:07:00 -0300
committerTim Graham <timograham@gmail.com>2015-09-02 15:27:41 -0400
commit6a98396b9da56bf5eb1c94e037b844eb9bdd1a45 (patch)
tree3e6507bc4f92ade4788a2ff18a14103a488687eb /django/apps/config.py
parent722bf23518afad6fd90694c17484da33551e4cef (diff)
Fixed #25246 -- Guarded against duplicate paths in AppConfig.
Diffstat (limited to 'django/apps/config.py')
-rw-r--r--django/apps/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/django/apps/config.py b/django/apps/config.py
index 98070e62c8..6a0c8d8e57 100644
--- a/django/apps/config.py
+++ b/django/apps/config.py
@@ -62,6 +62,10 @@ class AppConfig(object):
filename = getattr(module, '__file__', None)
if filename is not None:
paths = [os.path.dirname(filename)]
+ else:
+ # For unknown reasons, sometimes the list returned by __path__
+ # contains duplicates that must be removed (#25246).
+ paths = list(set(paths))
if len(paths) > 1:
raise ImproperlyConfigured(
"The app module %r has multiple filesystem locations (%r); "