diff options
| author | Karen Tracey <kmtracey@gmail.com> | 2009-01-17 23:06:23 +0000 |
|---|---|---|
| committer | Karen Tracey <kmtracey@gmail.com> | 2009-01-17 23:06:23 +0000 |
| commit | 02980f1c3cf23015b64f1d2ea3476c607ac0db66 (patch) | |
| tree | 011ccc395923b61964c58dc086bb07f5b37311d1 | |
| parent | 2ffeea20130c41091bd69748dca1c9c5a3dd9c8c (diff) | |
[1.0.X] 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.
Backport of r9770 from trunk.
Also updated svn metadata; all trunk bugfixes have been merged to the 1.0.X branch.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9772 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management/commands/loaddata.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index a6a7871c52..de6cd29956 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -127,12 +127,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() |
