From 0438b6848b097ea9ee2dc6eb761c0b49f5775644 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 13 Dec 2005 16:19:40 +0000 Subject: [PATCH] magic-removal: Changed django.core.management.init to display full traceback if there's an error during database initialization git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1614 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/core/management.py b/django/core/management.py index 459af4f80d..6fea4284c8 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -378,7 +378,9 @@ def init(): (db.db.quote_name(core.Site._meta.db_table), db.db.quote_name('domain'), db.db.quote_name('name'))) except Exception, e: - sys.stderr.write("Error: The database couldn't be initialized.\n%s\n" % e) + import traceback + sys.stderr.write("Error: The database couldn't be initialized.\n") + sys.stderr.write('\n'.join(traceback.format_exception(*sys.exc_info())) + "\n") try: db.db.rollback() except UnboundLocalError: