1
0
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:
Adam Johnson 2020-04-14 08:55:45 +01:00 committed by Mariusz Felisiak
parent 8bd9000a7d
commit 6cad911674

View File

@ -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.