How to use the redislite.__init__.__redis_server_info__.items function in redislite

To help you get started, we’ve selected a few redislite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github yahoo / redislite / redislite / View on Github external
def debug_info_list():
    Return a list with the debug information
    info = []
    redis_server = find_executable('redis-server')
    if __redis_executable__:  # pragma: no cover
        redis_server = __redis_executable__
    info.append("Redislite debug information:")
    info.append('\tVersion: %s' % __version__)
    info.append('\tModule Path: %s' % os.path.dirname(__file__))
    info.append('\n\tInstalled Redis Server:')
    info.append('\t\tRedis Executable: %s' % redis_server)
    for key, value in __redis_server_info__.items():  # pragma: no cover
        info.append('\t\t%s = %s' % (key, value))
    info.append('\n\tFound redis-server: %s' % redis_server)
    for item in os.popen('%s --version' % redis_server).read().strip().split():
        if '=' in item:
            key, value = item.split('=')
            info.append('\t\t%s = %s' % (key, value))
    info.append('\tSource Code Information')
    if __git_version__:  # pragma: no cover
        info.append('\t\tGit Source URL: %s' % __source_url__)
        info.append('\t\tGit Hash: %s' % __git_hash__)
        info.append('\t\tGit Version: %s' % __git_version__)
        info.append('\t\tGit Origin: %s' % __git_origin__)
        info.append('\t\tGit Branch: %s' % __git_branch__)
    return info