diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index dde9e6eb800..d06b131d6f9 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -108,10 +108,12 @@ class Command(BaseCommand): transaction.rollback() transaction.leave_transaction_management() if show_traceback: - raise - sys.stderr.write( - self.style.ERROR("Problem installing fixture '%s': %s\n" % - (full_path, str(e)))) + import traceback + traceback.print_exc() + else: + sys.stderr.write( + self.style.ERROR("Problem installing fixture '%s': %s\n" % + (full_path, str(e)))) return fixture.close() except: