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.rollback()
|
||||||
transaction.leave_transaction_management()
|
transaction.leave_transaction_management()
|
||||||
if show_traceback:
|
if show_traceback:
|
||||||
raise
|
import traceback
|
||||||
sys.stderr.write(
|
traceback.print_exc()
|
||||||
self.style.ERROR("Problem installing fixture '%s': %s\n" %
|
else:
|
||||||
(full_path, str(e))))
|
sys.stderr.write(
|
||||||
|
self.style.ERROR("Problem installing fixture '%s': %s\n" %
|
||||||
|
(full_path, str(e))))
|
||||||
return
|
return
|
||||||
fixture.close()
|
fixture.close()
|
||||||
except:
|
except:
|
||||||
|
|
Loading…
Reference in New Issue