Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #6420 -- Corrected the handling of the --traceback option in lo…

…addata. Thanks, Grzegorz Lukasik <hauserx@gmail.com>.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1e2852a15dd120ff542a4805d8dceed82fb56ba7 1 parent 7092bce
@freakboy3742 freakboy3742 authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 django/core/management/commands/loaddata.py
View
10 django/core/management/commands/loaddata.py
@@ -108,10 +108,12 @@ def handle(self, *fixture_labels, **options):
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:
Please sign in to comment.
Something went wrong with that request. Please try again.