Exemplo n.º 1
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname, self.logger)

        if not self.sparser_config:
            raise ValueError('No feedname provided or feedname not in conf.')

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.overwrite = False
        if hasattr(self.parameters, 'overwrite'):
            if self.parameters.overwrite:
                self.overwrite = True
Exemplo n.º 2
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname, self.logger)

        if not self.sparser_config:
            raise ValueError('No feedname provided or feedname not in conf.')

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.overwrite = False
        if hasattr(self.parameters, 'overwrite'):
            if self.parameters.overwrite:
                self.overwrite = True
Exemplo n.º 3
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname)

        if not self.sparser_config:
            self.logger.error('No feedname provided or feedname not in conf.')
            self.stop()

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.override = False
        if hasattr(self.parameters, 'override'):
            if self.parameters.override:
                self.override = True

        # Already warned about deprecation
        self.depr_warning = False
Exemplo n.º 4
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname)

        if not self.sparser_config:
            self.logger.error('No feedname provided or feedname not in conf.')
            self.stop()

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.overwrite = False
        if hasattr(self.parameters, 'override'):  # TODOv1.1: remove
            self.logger.error('Parameter "override" is deprecated, '
                              'it is now called "overwrite". Stopping now. '
                              '(This warning will be removed before v1.1.)')
            self.stop()
        if hasattr(self.parameters, 'overwrite'):
            if self.parameters.overwrite:
                self.overwrite = True
Exemplo n.º 5
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname)

        if not self.sparser_config:
            self.logger.error('No feedname provided or feedname not in conf.')
            self.stop()

        self.csv_params = {'quoting': csv.QUOTE_NONE,
                           'escapechar': None,
                           'quotechar': '',
                           'dialect': 'unix'}

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.override = False
        if hasattr(self.parameters, 'override'):
            if self.parameters.override:
                self.override = True
Exemplo n.º 6
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname)

        if not self.sparser_config:
            self.logger.error('No feedname provided or feedname not in conf.')
            self.stop()

        self.csv_params = {
            'quoting': csv.QUOTE_NONE,
            'escapechar': None,
            'quotechar': '',
            'dialect': 'unix'
        }

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.override = False
        if hasattr(self.parameters, 'override'):
            if self.parameters.override:
                self.override = True
Exemplo n.º 7
0
    def init(self):
        self.sparser_config = None
        if hasattr(self.parameters, 'feedname'):
            self.feedname = self.parameters.feedname
            self.sparser_config = config.get_feed(self.feedname)

        if not self.sparser_config:
            self.logger.error('No feedname provided or feedname not in conf.')
            self.stop()

        # Set a switch if the parser shall reset the feed.name,
        # code and feedurl for this event
        self.overwrite = False
        if hasattr(self.parameters, 'override'):  # TODOv1.1: remove
            self.logger.error('Parameter "override" is deprecated, '
                              'it is now called "overwrite". Stopping now. '
                              '(This warning will be removed before v1.1.)')
            self.stop()
        if hasattr(self.parameters, 'overwrite'):
            if self.parameters.overwrite:
                self.overwrite = True

        # Already warned about deprecation
        self.depr_warning = False