mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Fixed #16397 -- Respected the --traceback flag in BaseCommand. This should make import loops easier to debug. Refs #11667, #17369.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17197 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from optparse import make_option
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import NoArgsCommand
|
||||
@@ -129,7 +130,6 @@ class Command(NoArgsCommand):
|
||||
sys.stderr.write("Failed to install custom SQL for %s.%s model: %s\n" % \
|
||||
(app_name, model._meta.object_name, e))
|
||||
if show_traceback:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
transaction.rollback_unless_managed(using=db)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user