Ticket #8055: 8055-r9733.diff

File 8055-r9733.diff, 1.1 KB (added by Ramiro Morales, 15 years ago)

Patch for this fixing usage of print-exc (unavailable on Python 2.3) and a superflous import

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

    diff -r 17d90a72f580 django/core/management/commands/loaddata.py
    a b  
    161161                                    transaction.rollback()
    162162                                    transaction.leave_transaction_management()
    163163                                    if show_traceback:
    164                                         import traceback
    165164                                        traceback.print_exc()
    166165                                    else:
    167166                                        sys.stderr.write(
    168167                                            self.style.ERROR("Problem installing fixture '%s': %s\n" %
    169                                                  (full_path, traceback.format_exc())))
     168                                                 (full_path, ''.join(traceback.format_exception(sys.exc_type,
     169                                                     sys.exc_value, sys.exc_traceback)))))
    170170                                    return
    171171                                fixture.close()
    172172
Back to Top