diff options
| author | Adam Johnson <me@adamj.eu> | 2020-04-14 08:55:45 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-04-14 13:22:47 +0200 |
| commit | 6cad911674dc067ffab44eea4f5c8170fa0a89b1 (patch) | |
| tree | d6268c2fa075136a017cc94f01d0f568fa80bbea | |
| parent | 8bd9000a7db3dcf14b003e8ef18137ea1296c07b (diff) | |
Refs #29501 -- Simplified BaseCommand.run_from_argv() a bit.
| -rw-r--r-- | django/core/management/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/management/base.py b/django/core/management/base.py index 74ffc94dcf..82da46875a 100644 --- a/django/core/management/base.py +++ b/django/core/management/base.py @@ -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. |
