diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2008-03-07 13:53:49 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2008-03-07 13:53:49 +0000 |
| commit | 1e2852a15dd120ff542a4805d8dceed82fb56ba7 (patch) | |
| tree | 489a3f0b07738c23eec0a754fde8d018d6570f80 | |
| parent | 7092bcee6e399fec5fc143a0e014a103099d6660 (diff) | |
Fixed #6420 -- Corrected the handling of the --traceback option in loaddata. Thanks, Grzegorz Lukasik <hauserx@gmail.com>.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@7199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management/commands/loaddata.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index dde9e6eb80..d06b131d6f 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: |
