vdb/lib/utils.py
def serialize_vuln_list(datas):
    """Serialize vulnerability data list to help with storage

    :param datas: Data list to store
    :return List of serialized data
    """
    data_list = []
    for data in datas:
        ddata = data
        details = None
        if type(data) != "dict":
            ddata = vars(data)
            details = data.details
        else:
            details = data["details"]
        for vuln_detail in details:
            data_to_insert = ddata.copy()
            data_to_insert["details"] = vuln_detail
            data_list.append(dump(data_to_insert))
    return data_list
Serialize vulnerability data list to help with storage

    :param datas: Data list to store
    :return List of serialized data
    
Serialize vulnerability data list to help with storage
:param datas: Data list to store
:return List of serialized data
Serialize vulnerability data list to help with storage : param datas : Data list to store : return List of serialized data
def serialize_vuln_list(datas):
    data_list = []
    for data in datas:
        ddata = data
        details = None
        if type(data) != "dict":
            ddata = vars(data)
            details = data.details
        else:
            details = data["details"]
        for vuln_detail in details:
            data_to_insert = ddata.copy()
            data_to_insert["details"] = vuln_detail
            data_list.append(dump(data_to_insert))
    return data_list
def serialize_vuln_list ( datas ) : data_list = [ ] for data in datas : ddata = data details = None if type ( data ) != "dict" : ddata = vars ( data ) details = data . details else : details = data [ "details" ] for vuln_detail in details : data_to_insert = ddata . copy ( ) data_to_insert [ "details" ] = vuln_detail data_list . append ( dump ( data_to_insert ) ) return data_list
Serialize vulnerability data list to help with storage
:param datas: Data list to store
:return List of serialized data
Serialize vulnerability data list to help with storage : param datas : Data list to store : return List of serialized data
"""Serialize vulnerability data list to help with storage

    :param datas: Data list to store
    :return List of serialized data
    """
datas