#NEWLINE# def sudo( command , shell = True , user = None , pty = False ) : #NEWLINE# #INDENT# 'If the host is localhost, runs without requiring SSH.' #NEWLINE# require ( 'hosts' ) #NEWLINE# if ( 'localhost' in env . hosts ) : #NEWLINE# #INDENT# command = ( 'sudo %s' % command ) #NEWLINE# return local ( command , capture = False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return fabric_sudo ( command , shell , user , pty )