@staticmethod
def get_entry_property(entry, prop, default=None, raw=False):
    """
        Simple wrapper that gets an attribute from ldap3 dictionary,
        converting empty values to the default specified. This is primarily
        for output to JSON
        """
    try:
        if raw:
            value = entry['raw_attributes'][prop]
        else:
            value = entry['attributes'][prop]
    except KeyError:
        return default
    if value == []:
        return default
    try:
        if len(value) == 1 and default != []:
            return value[0]
    except TypeError:
        pass
    return value
