コード例 #1
0
ファイル: knitrepo.py プロジェクト: pombreda/dist-packages
    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)
コード例 #2
0
ファイル: knitrepo.py プロジェクト: GymWenFLL/tpp_libs
    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)