mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Refs #29501 -- Allowed customizing exit status for management commands.
This commit is contained in:
parent
6cad911674
commit
8e8c3f964e
5 changed files with 21 additions and 7 deletions
|
@ -15,7 +15,7 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
example = options["example"]
|
||||
if example == "raise":
|
||||
raise CommandError()
|
||||
raise CommandError(returncode=3)
|
||||
if options['verbosity'] > 0:
|
||||
self.stdout.write("I don't feel like dancing %s." % options["style"])
|
||||
self.stdout.write(','.join(options))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue