def result_to_dict(commandResult, record_sep='\n', field_sep=':'):
    metadata = {}
    if commandResult.success:
        for record in commandResult.result.std_out.split(record_sep):
            try:
                key, val = record.split(field_sep, 1)
            except __HOLE__:
                continue
            metadata[key.strip()] = val.strip()
    else:
        log.debug('failure:{0.command} :{0.std_err}'.format(commandResult.result))
    return metadata
dataset/ETHPy150Open Netflix/aminator/aminator/util/linux.py/result_to_dict