开发者

How to abort python fabric run command?

run("if [ -d data.bak ];then mv data.bak data;fi;")
sudo('....')
sudo('')

I am using fabric deploy for my web project. I want to fin开发者_JAVA百科d a way that will stop the rest of the execution of the command, if it doesn't find the data.bak directory. Any way to achieve this in fabric?


There is a contribute api in fabric.contrib.files import.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜