<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> from distutils . spawn import find_executable <EOL> from . __init__ import __version__ , __git_version__ , __source_url__ , __git_hash__ , __git_origin__ , __git_branch__ , __redis_server_info__ , __redis_executable__ <EOL> import os <EOL> def debug_info_list ( ) : <EOL> """<STR_LIT>""" <EOL> info = [ ] <EOL> redis_server = find_executable ( '<STR_LIT>' ) <EOL> if __redis_executable__ : <EOL> redis_server = __redis_executable__ <EOL> info . append ( "<STR_LIT>" ) <EOL> info . append ( '<STR_LIT>' % __version__ ) <EOL> info . append ( '<STR_LIT>' % os . path . dirname ( __file__ ) ) <EOL> info . append ( '<STR_LIT>' ) <EOL> info . append ( '<STR_LIT>' % redis_server ) <EOL> for key , value in __redis_server_info__ . items ( ) : <EOL> info . append ( '<STR_LIT>' % ( key , value ) ) <EOL> info . append ( '<STR_LIT>' % redis_server ) <EOL> for item in os . popen ( '<STR_LIT>' % redis_server ) . read ( ) . strip ( ) . split ( ) : <EOL> if '<STR_LIT:=>' in item : <EOL> key , value = item . split ( '<STR_LIT:=>' ) <EOL> info . append ( '<STR_LIT>' % ( key , value ) ) <EOL> info . append ( '<STR_LIT>' ) <EOL> info . append ( '<STR_LIT>' ) <EOL> if __git_version__ : <EOL> info . append ( '<STR_LIT>' % __source_url__ ) <EOL> info . append ( '<STR_LIT>' % __git_hash__ ) <EOL> info . append ( '<STR_LIT>' % __git_version__ ) <EOL> info . append ( '<STR_LIT>' % __git_origin__ ) <EOL> info . append ( '<STR_LIT>' % __git_branch__ ) <EOL> return info <EOL> def debug_info ( ) : <EOL> """<STR_LIT>""" <EOL> return os . linesep . join ( debug_info_list ( ) ) <EOL> def print_debug_info ( ) : <EOL> """<STR_LIT>""" <EOL> print ( debug_info ( ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> print_debug_info ( ) </s>
