Commits

Anonymous committed bca45b8

Fixed #6420 -- Corrected the handling of the --traceback option in loaddata. Thanks, Grzegorz Lukasik <hauserx@gmail.com>.

  • Participants
  • Parent commits b98d7fd

Comments (0)

Files changed (1)

File django/core/management/commands/loaddata.py

                                 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: