Re: How safe is it to use sys.exit() in custom commands

2017-09-30 Thread Tim Graham
I don't know of any reason why that would be unsafe. You'll find several uses of sys.exit() in Django's built in commands located in django/core/management/commands. On Friday, September 29, 2017 at 5:13:50 PM UTC-4, phep wrote: > > Hi, > > Executive summary : everything's in the subject line.

How safe is it to use sys.exit() in custom commands

2017-09-29 Thread phep
Hi, Executive summary : everything's in the subject line. Boring details : I have a Django application where I use a lot of custom commands, most being designed to be launched mostly by cron-jobs or other bash scripts of some sorts. In this respect, the exit code value may be of utmost import