Skip to content

Instantly share code, notes, and snippets.

@youpy
Created October 1, 2013 02:59
Show Gist options
  • Save youpy/6773314 to your computer and use it in GitHub Desktop.
Save youpy/6773314 to your computer and use it in GitHub Desktop.
fabric: password prompt on a parallel task
def password():
return getpass.getpass()
@parallel
def _foo():
sudo('foo')
@task
def foo():
"""execute foo"""
env.password = password()
execute(_foo)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment