mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
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)
|
||||
try:
|
||||
self.execute(*args, **cmd_options)
|
||||
except Exception as e:
|
||||
if options.traceback or not isinstance(e, CommandError):
|
||||
except CommandError as e:
|
||||
if options.traceback:
|
||||
raise
|
||||
|
||||
# SystemCheckError takes care of its own formatting.
|
||||
|
Loading…
Reference in New Issue
Block a user