Dear doers.
In make
, one can prepend "-" to mark a command which is allowed to fail and will not break the whole set of actions.
E.g. following (modified) snippet from Makefile for building PDF documentation tries few times command pdflatex
(and all must succeed), then it tries command makeindex
, which is allowed to fail without breaking whole task execution, and finally gives few more executions of pdflatex
.
%.pdf: %.tex
pdflatex '$<'
pdflatex '$<'
pdflatex '$<'
-makeindex -s python.ist '$(basename $<).idx'
pdflatex '$<'
pdflatex '$<'
Question: is such an option available in doit
?
Some ideas and proposals for case it is not possible (yet):
Jan Vlčinský
Dear doers.
In
make
, one can prepend "-" to mark a command which is allowed to fail and will not break the whole set of actions.
Question: is such an option available indoit
?
from doit.tools import LongRunning as FailSafedef task_failing():"""Task with always failing action - always breaking the task"""return {"actions": ["echo Shiny happy people laughing","false","echo which will never happen"],"verbosity": 2}def task_failing_safe():"""Task with always failing action - but failing safe"""return {"actions": ["echo Shiny happy people laughing",FailSafe("false"),"echo we got over our troubles"],"verbosity": 2}
--
You received this message because you are subscribed to the Google Groups "python-doit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-doit...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.