Skip to content

Commit 6cad911

Browse files
adamchainzfelixxm
authored andcommitted
Refs #29501 -- Simplified BaseCommand.run_from_argv() a bit.
1 parent 8bd9000 commit 6cad911

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

django/core/management/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,8 @@ def run_from_argv(self, argv):
326326
handle_default_options(options)
327327
try:
328328
self.execute(*args, **cmd_options)
329-
except Exception as e:
330-
if options.traceback or not isinstance(e, CommandError):
329+
except CommandError as e:
330+
if options.traceback:
331331
raise
332332

333333
# SystemCheckError takes care of its own formatting.

0 commit comments

Comments
 (0)