mirror of https://github.com/django/django.git
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
This commit is contained in:
parent
7092bcee6e
commit
1e2852a15d
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue