mirror of
https://github.com/django/django.git
synced 2025-07-19 17:19:12 +00:00
[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
This commit is contained in:
parent
2ffeea2013
commit
02980f1c3c
@ -127,12 +127,12 @@ class Command(BaseCommand):
|
|||||||
transaction.rollback()
|
transaction.rollback()
|
||||||
transaction.leave_transaction_management()
|
transaction.leave_transaction_management()
|
||||||
if show_traceback:
|
if show_traceback:
|
||||||
import traceback
|
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
else:
|
else:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
self.style.ERROR("Problem installing fixture '%s': %s\n" %
|
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
|
return
|
||||||
fixture.close()
|
fixture.close()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user