#NEWLINE# def __init__( self , index_path ) : #NEWLINE# #INDENT# self . index_path = index_path #NEWLINE# if ( not os . path . exists ( index_path ) ) : #NEWLINE# #INDENT# open ( index_path , 'w' ) . close ( ) #NEWLINE# build_index_path = os . path . join ( settings . GRAPHITE_ROOT , 'bin/build-index.sh' ) #NEWLINE# retcode = subprocess . call ( build_index_path ) #NEWLINE# if ( retcode != 0 ) : #NEWLINE# #INDENT# log . exception ( ( "Couldn't build index file %s" % index_path ) ) #NEWLINE# raise RuntimeError ( ( "Couldn't build index file %s" % index_path ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . last_mtime = 0 #NEWLINE# self . _tree = ( None , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# log . info ( '[IndexSearcher] performing initial index load' ) #NEWLINE# self . reload ( )