mirror of https://github.com/django/django.git
Refs #29501 -- Simplified BaseCommand.run_from_argv() a bit.
This commit is contained in:
parent
8bd9000a7d
commit
6cad911674
|
@ -326,8 +326,8 @@ class BaseCommand:
|
||||||
handle_default_options(options)
|
handle_default_options(options)
|
||||||
try:
|
try:
|
||||||
self.execute(*args, **cmd_options)
|
self.execute(*args, **cmd_options)
|
||||||
except Exception as e:
|
except CommandError as e:
|
||||||
if options.traceback or not isinstance(e, CommandError):
|
if options.traceback:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
# SystemCheckError takes care of its own formatting.
|
# SystemCheckError takes care of its own formatting.
|
||||||
|
|
Loading…
Reference in New Issue