@classmethod
    def configure_base(cls, config, extractor_base):
        """ Parse config object and do basic config on an Extractor
        """

        if isinstance(config, dict):
            try:
                config = config['template']
                extractor_base.is_templated = True
                extractor_base.query = config
            except __HOLE__:
                raise ValueError(
                    "Cannot define a dictionary config for abstract extractor without it having template key")
        elif isinstance(config, basestring):
            extractor_base.query = config
            extractor_base.is_templated = False
        else:
            raise TypeError(
                "Base extractor must have a string or {template: querystring} configuration node!")
        return extractor_base
dataset/ETHPy150Open svanoort/pyresttest/pyresttest/validators.py/AbstractExtractor.configure_base