parameters: (path)
return_statement: return os.path.realpath(result)
docstring: Adjusts the directory until a compilation database is found.
docstring_summary: Adjusts the directory until a compilation database is found.
docstring_tokens: Adjusts the directory until a compilation database is found .
function: def find_compilation_database(path):
    """Adjusts the directory until a compilation database is found."""
    result = './'
    while not os.path.isfile(os.path.join(result, path)):
      if os.path.realpath(result) == '/':
        print 'Error: could not find compilation database.'
        sys.exit(1)
      result += '../'
    return os.path.realpath(result)
function_tokens: def find_compilation_database ( path ) : result = './' while not os . path . isfile ( os . path . join ( result , path ) ) : if os . path . realpath ( result ) == '/' : print 'Error: could not find compilation database.' sys . exit ( 1 ) result += '../' return os . path . realpath ( result )