Provide a way to skip sys.exit() when using call_command()
|Reported by:||Claude Paroz||Owned by:||nobody|
|Component:||Core (Management commands)||Version:||master|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
When running a management command from Python code with call_command, any CommandError raised in the execute method will call sys.exit(1). This is not always desirable, so we should provide a way to call call_command without this flaw.
This should also allow us to fix issues like #10200 painlessly.