From 81dfd1f5f037019a227a767877b2124311cff738 Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Sat, 17 Jan 2009 22:15:07 +0000 Subject: [PATCH] Fixed #8055: Replaced use of traceback.format_exc (new in Python 2.4) with something that works as far back as 2.3. Thanks to Ramiro for diagnosis and patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9770 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/management/commands/loaddata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index 89d195e4cd..e70f85b9a6 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -161,12 +161,12 @@ class Command(BaseCommand): transaction.rollback() transaction.leave_transaction_management() if show_traceback: - import traceback traceback.print_exc() else: sys.stderr.write( self.style.ERROR("Problem installing fixture '%s': %s\n" % - (full_path, traceback.format_exc()))) + (full_path, ''.join(traceback.format_exception(sys.exc_type, + sys.exc_value, sys.exc_traceback))))) return fixture.close()