def get_config( config_path=CONFIG_PATH ):
parser = SafeConfigParser()<EOL>parser.read( config_path )<EOL>config_dir = os.path.dirname(config_path)<EOL>immutable_key = False<EOL>key_id = None<EOL>blockchain_id = None<EOL>hostname = socket.gethostname()<EOL>wallet = None<EOL>if parser.has_section('<STR_LIT>'):<EOL><INDENT>if parser.has_option('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>immutable_key = parser.get('<STR_LIT>', '<STR_LIT>')<EOL>if immutable_key.lower() in ['<STR_LIT:1>', '<STR_LIT:yes>', '<STR_LIT:true>']:<EOL><INDENT>immutable_key = True<EOL><DEDENT>else:<EOL><INDENT>immutable_key = False<EOL><DEDENT><DEDENT>if parser.has_option('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>key_id = parser.get('<STR_LIT>', '<STR_LIT>' )<EOL><DEDENT>if parser.has_option('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>blockchain_id = parser.get('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>if parser.has_option('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>hostname = parser.get('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT>if parser.has_option('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>wallet = parser.get('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT><DEDENT>config = {<EOL>'<STR_LIT>': immutable_key,<EOL>'<STR_LIT>': key_id,<EOL>'<STR_LIT>': blockchain_id,<EOL>'<STR_LIT>': hostname,<EOL>'<STR_LIT>': wallet<EOL>}<EOL>return config<EOL>
Get the config