Thanks a lot guys for the informations and extra arguments. cheers,
F. 2015-12-31 13:47 GMT+01:00 Campbell Barton <[email protected]>: > On Thu, Dec 31, 2015 at 3:15 AM, François T. <[email protected]> > wrote: > > Hello guys, > > > > I'm asking here because I'm not quite sure it is a bug or design matter. > > > > We are using blender on our renderfarm (Deadline) to generate some datas > > with a python script using the following command : > > blender --background --python script.py > > > > If the python script crash or raise an error, blender will exit with a > zero > > code, so the renderfarm is not catching something has been wrong. > > > > In the mean time, we have to do a try/except in our scripts and add > > os._exit(0) or os._exit(-1) (_exit() because blender doesn't accept the > > exit()). > > Committed a new argument `--python-exit-code`, so you can tell blender > to exit if theres an error in a script. > > https://developer.blender.org/rB82a1adfbdf719178cb65c75d58e47c4742bc7a6e > > Note that typically in Python you would call `sys.exit` (not `os._exit`). > > > > We are wondering if this is the correct approach or if blender shouldn't > > return the code itself if the script didn't run correctly ? > > > > > > cheers, > > > > F. > > _______________________________________________ > > Bf-committers mailing list > > [email protected] > > http://lists.blender.org/mailman/listinfo/bf-committers > > > > -- > - Campbell > _______________________________________________ > Bf-committers mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-committers > -- ____________________ François Tarlier www.francois-tarlier.com www.linkedin.com/in/francoistarlier _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
