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
1 changed files with 2 additions and 2 deletions

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.