Skip to content

Commit

Permalink
Changed variable fab_debug -> fab_print_real_sudo as it was too generic.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvest committed Mar 9, 2008
1 parent eff6d02 commit c3bc2ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fabric.py
Expand Up @@ -59,7 +59,7 @@
'fab_new_host_key':'accept',
'fab_shell':'/bin/bash -l -c "%s"',
'fab_timestamp':datetime.datetime.utcnow().strftime('%F_%H-%M-%S'),
'fab_debug':False,
'fab_print_real_sudo':False,
}

CONNECTIONS = []
Expand Down Expand Up @@ -276,7 +276,7 @@ def sudo(host, client, env, cmd, **kvargs):
"""
cmd = _lazy_format(cmd, env)
real_cmd = env['fab_shell'] % ("sudo -S " + cmd.replace('"', '\\"'))
cmd = env['fab_debug'] and real_cmd or cmd
cmd = env['fab_print_real_sudo'] and real_cmd or cmd
if not _confirm_proceed('sudo', host, kvargs):
return False # TODO: should we return False in fail??
print("[%s] sudo: %s" % (host, cmd))
Expand Down

0 comments on commit c3bc2ce

Please sign in to comment.