Skip to content

Commit 60c5f63

Browse files
committed
[soc2010/app-loading] removed app_errors attribute
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/app-loading@13495 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 6f4fc60 commit 60c5f63

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

django/core/apps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ def __init__(self, label):
33
if '.' in label:
44
label = label.split('.')[-1]
55
self.label = label
6-
self.errors = {}
6+
# errors raised when trying to import the app
7+
self.errors = []
78
self.models = []
89
self.models_module = None
910

django/db/models/loading.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ class AppCache(object):
2929
# Mapping of app_labels to a dictionary of model names to model code.
3030
app_models = SortedDict(),
3131

32-
# Mapping of app_labels to errors raised when trying to import the app.
33-
app_errors = {},
34-
3532
# -- Everything below here is only used when populating the cache --
3633
loaded = False,
3734
handled = {},
@@ -154,8 +151,10 @@ def get_app(self, app_label, emptyOK=False):
154151
def get_app_errors(self):
155152
"Returns the map of known problems with the INSTALLED_APPS."
156153
self._populate()
157-
for app in app_instances:
158-
self.app_errors.update(app.errors)
154+
errors = {}
155+
for app in self.app_instances:
156+
if app.errors:
157+
errors.update({app.label: app.errors})
159158
return errors
160159

161160
def get_models(self, app_mod=None, include_auto_created=False, include_deferred=False):

0 commit comments

Comments
 (0)