diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-07-05 05:11:20 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2006-07-05 05:11:20 +0000 |
| commit | 5404e6e93bd46abb1b55bebfe23f2cdbeb373c93 (patch) | |
| tree | b7096ae6abea4a43847d78f5094ec2f1ca081fef | |
| parent | a778c9de4773d7a9d53b86b3aa4bc54bfbc40b8d (diff) | |
Fixed #2285 -- Tweaked the error message after model errors at "syncdb" time so
that we don't report an app name of "None".
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/core/management.py b/django/core/management.py index 5dd18ddd46..a2bacdcc48 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -1003,7 +1003,10 @@ def _check_for_validation_errors(app=None): s = StringIO() num_errors = get_validation_errors(s, app) if num_errors: - sys.stderr.write(style.ERROR("Error: %s couldn't be installed, because there were errors in your model:\n" % app)) + if app: + sys.stderr.write(style.ERROR("Error: %s couldn't be installed, because there were errors in your model:\n" % app)) + else: + sys.stderr.write(style.ERROR("Error: Couldn't install apps, because there were errors in one or more models:\n")) s.seek(0) sys.stderr.write(s.read()) sys.exit(1) |
