def is_compatible(source, target): """Be compatible with known Knit formats. We don't test for the stores being of specific types because that could lead to confusing results, and there is no need to be overly general. """ try: are_knits = (isinstance(source._format, RepositoryFormatKnit) and isinstance(target._format, RepositoryFormatKnit)) except AttributeError: return False return are_knits and InterRepository._same_model(source, target)
def is_compatible(source, target): """Be compatible with known Knit formats. We don't test for the stores being of specific types because that could lead to confusing results, and there is no need to be overly general. """ try: are_knits = isinstance(source._format, RepositoryFormatKnit) and isinstance( target._format, RepositoryFormatKnit ) except AttributeError: return False return are_knits and InterRepository._same_model(source, target)