Exemple #1
0
    def _check_notice_board_availability(self, entropy_client, repo):
        """
        Check Notice Board availability.
        """
        def show_err():
            entropy_client.output(blue(_("Notice board not available")),
                                  level="error",
                                  importance=1,
                                  header=darkred(" @@ "))

        nb = NoticeBoard(repo)
        try:
            data = nb.data()
        except KeyError:
            data = None

        if not data:
            show_err()
            return

        return data
Exemple #2
0
    def _check_notice_board_availability(self, entropy_client, repo):
        """
        Check Notice Board availability.
        """
        def show_err():
            entropy_client.output(
                blue(_("Notice board not available")),
                level="error", importance=1,
                header=darkred(" @@ "))

        nb = NoticeBoard(repo)
        try:
            data = nb.data()
        except KeyError:
            data = None

        if not data:
            show_err()
            return

        return data
Exemple #3
0
    def _check_notice_board_availability(self, entropy_client, repository):
        """
        Determine if a NoticeBoard for the given repository is
        available.
        """
        def show_err():
            entropy_client.output(
                "%s%s" %
                (darkred(" @@ "), blue(_("Notice board not available"))),
                level="error",
                importance=1)

        nb = NoticeBoard(repository)

        try:
            data = nb.data()
        except KeyError:
            data = None
            show_err()

        if not data:
            return None

        return data
Exemple #4
0
    def _check_notice_board_availability(self, entropy_client, repository):
        """
        Determine if a NoticeBoard for the given repository is
        available.
        """
        def show_err():
            entropy_client.output(
                "%s%s" % (
                    darkred(" @@ "),
                    blue(_("Notice board not available"))),
                    level="error", importance=1)

        nb = NoticeBoard(repository)

        try:
            data = nb.data()
        except KeyError:
            data = None
            show_err()

        if not data:
            return None

        return data