Skip to content

checkdata management command should not call sys.exit directly #202

@olivierdalang

Description

@olivierdalang

Hey again (still me :-) will try to contribute some fixes if I can find these days)

checkdata's implementation calls sys.exit, which prevents calling it programmatically with django.core.management.call_command (at least without catching SystemExit exceptions, which could have side effects I guess ?).

As far as I understand, system exit is implemented by BaseCommand, so rather than calling sys.exit, we should either do nothing (on success) or raise CommandError (which accepts an exit code arg).

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions