<s> import sys <EOL> from lib import shellhelpers as shell <EOL> from lib . chef_runner import ChefRunner <EOL> class ChefApplyRunner ( ChefRunner ) : <EOL> '''<STR_LIT>''' <EOL> cmdline_options = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' , { } ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , { } ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , { } ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , { '<STR_LIT:action>' : '<STR_LIT:store_true>' } ) , <EOL> ( None , '<STR_LIT>' , { '<STR_LIT:action>' : '<STR_LIT:store_true>' } ) , <EOL> ( None , '<STR_LIT>' , { } ) <EOL> ] <EOL> def __init__ ( self ) : <EOL> super ( ChefApplyRunner , self ) . __init__ ( ) <EOL> self . chef_binary = '<STR_LIT>' <EOL> def execute ( self ) : <EOL> parser = shell . CmdlineParser ( self . cmdline_options ) <EOL> args_dict = vars ( parser . raw_parser . parse_args ( ) ) <EOL> args_dict [ '<STR_LIT>' ] = args_dict . pop ( '<STR_LIT>' ) <EOL> recipe_file = args_dict . pop ( '<STR_LIT>' ) <EOL> command = ( [ self . locate_binary ( self . chef_binary ) ] + <EOL> parser . short_arglist ( kwargs = args_dict ) ) <EOL> if recipe_file and args_dict [ '<STR_LIT>' ] is None : <EOL> command . insert ( <NUM_LIT:1> , recipe_file ) <EOL> exit_code = shell . shell_out ( command ) <EOL> sys . exit ( exit_code ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> runner = ChefApplyRunner ( ) <EOL> runner . execute ( ) </s>
