def fix_vobject(vcard):
    """trying to fix some more or less common errors in vcards

    for now only missing FN properties are handled (and reconstructed from N)
    :type vcard: vobject.base.Component (vobject based vcard)

    """
    if 'fn' not in vcard.contents:
        logging.debug('vcard has no formatted name, reconstructing...')
        fname = vcard.contents['n'][0].valueRepr()
        fname = fname.strip()
        vcard.add('fn')
        vcard.fn.value = fname
    return vcard
dataset/ETHPy150Open geier/pycarddav/pycarddav/model.py/fix_vobject/original