开发者

How to abort python fabric run command?

开发者 https://www.devze.com 2023-01-20 14:00 出处:网络
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 execut
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

精彩评论

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