#NEWLINE# def _find_cmd( self , cmd ) : #NEWLINE# #INDENT# '\n        Locates command under cassandra root and fixes permissions if needed\n        ' #NEWLINE# cdir = self . get_install_cassandra_root ( ) #NEWLINE# if ( self . get_base_cassandra_version ( ) >= 2.1 ) : #NEWLINE# #INDENT# fcmd = common . join_bin ( cdir , os . path . join ( 'tools' , 'bin' ) , cmd ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# fcmd = common . join_bin ( cdir , 'bin' , cmd ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if os . path . exists ( self ) : #NEWLINE# #INDENT# os . chmod ( fcmd , ( ( ( ( ( ( stat . S_IRUSR | stat . S_IWUSR ) | stat . S_IXUSR ) | stat . S_IRGRP ) | stat . S_IXGRP ) | stat . S_IROTH ) | stat . S_IXOTH ) ) #NEWLINE# #UNINDENT# #UNINDENT# except : #NEWLINE# #INDENT# print_ ( "WARN: Couldn't change permissions to use {0}." . format ( cmd ) ) #NEWLINE# print_ ( "WARN: If it didn't work, you will have to do so manually." ) #NEWLINE# #UNINDENT# return fcmd