Example #1
0
    def _test_feed_parser(self, provider):
        """
        Checks if the feed_parser value was in the restricted values list.

        :param provider: ingest provider document
        """
        if getattr(self, 'parser_restricted_values', None) and 'feed_parser' in provider and \
                provider['feed_parser'] not in self.parser_restricted_values:
            raise SuperdeskIngestError.invalidFeedParserValue(provider=provider)
Example #2
0
    def _test_feed_parser(self, provider):
        """
        Checks if the feed_parser value was in the restricted values list.

        :param provider: ingest provider document
        """
        if getattr(self, 'parser_restricted_values', None) and 'feed_parser' in provider and \
                provider['feed_parser'] not in self.parser_restricted_values:
            raise SuperdeskIngestError.invalidFeedParserValue(
                provider=provider)
Example #3
0
    def _test_feed_parser(self, provider):
        """
        Checks if the feed_parser value was in the restricted values list.

        :param provider: ingest provider document
        """
        feeding_service = provider.get('feeding_service')
        feed_parser = provider.get('feed_parser')

        if feeding_service and feed_parser and restricted_feeding_service_parsers.get(feeding_service) and \
                not restricted_feeding_service_parsers.get(feeding_service).get(feed_parser):
            raise SuperdeskIngestError.invalidFeedParserValue(provider=provider)
    def _test_feed_parser(self, provider):
        """
        Checks if the feed_parser value was in the restricted values list.

        :param provider: ingest provider document
        """
        feeding_service = provider.get('feeding_service')
        feed_parser = provider.get('feed_parser')

        if feeding_service and feed_parser and restricted_feeding_service_parsers.get(feeding_service) and \
                not restricted_feeding_service_parsers.get(feeding_service).get(feed_parser):
            raise SuperdeskIngestError.invalidFeedParserValue(provider=provider)