Exemple #1
0
def _ea_compare_rps(rp1, rp2):
    """Return true if rp1 and rp2 have same extended attributes."""
    ea1 = eas_acls.ExtendedAttributes(rp1.index)
    ea1.read_from_rp(rp1)
    ea2 = eas_acls.ExtendedAttributes(rp2.index)
    ea2.read_from_rp(rp2)
    return ea1 == ea2
Exemple #2
0
def get_meta_object(*params):
    """
    Returns a Metadata object as corresponds to the current type

    Necessary to guarantee compatibility between rdiff-backup 2.0 and 2.1+
    """
    if Globals.get_api_version() < 201:  # compat200
        from rdiff_backup import eas_acls
        return eas_acls.ExtendedAttributes(*params)
    else:
        return ExtendedAttributes(*params)