Browse files

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
  • Loading branch information...
1 parent 3c87c22 commit 81dfd1f5f037019a227a767877b2124311cff738 @kmtracey kmtracey committed Jan 17, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 django/core/management/commands/loaddata.py
View
4 django/core/management/commands/loaddata.py
@@ -161,12 +161,12 @@ def read(self):
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()

0 comments on commit 81dfd1f

Please sign in to comment.