Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Russell Keith-Magee authored March 07, 2008
10  django/core/management/commands/loaddata.py
@@ -108,10 +108,12 @@ def handle(self, *fixture_labels, **options):
108 108
                                 transaction.rollback()
109 109
                                 transaction.leave_transaction_management()
110 110
                                 if show_traceback:
111  
-                                    raise
112  
-                                sys.stderr.write(
113  
-                                    self.style.ERROR("Problem installing fixture '%s': %s\n" %
114  
-                                         (full_path, str(e))))
  111
+                                    import traceback
  112
+                                    traceback.print_exc()
  113
+                                else:
  114
+                                    sys.stderr.write(
  115
+                                        self.style.ERROR("Problem installing fixture '%s': %s\n" %
  116
+                                             (full_path, str(e))))
115 117
                                 return
116 118
                             fixture.close()
117 119
                     except:

0 notes on commit 1e2852a

Please sign in to comment.
Something went wrong with that request. Please try again.