As with Fabric 1.5, there is a ContextManager that makes this simpler:
from fabric.api import sudo, warn_only with warn_only(): sudo('mkdir foo')
Update: I re-confirmed that this works in ipython using the following code.
from fabric.api import local, warn_only
Chris Marinos Oct 23 '13 at 15:30 2013-10-23 15:30
source share