improve SharedConfigMixin config lookups

This commit is contained in:
Mike Fährmann
2019-11-25 18:30:01 +01:00
parent b5c964332b
commit ae09f87602

View File

@@ -422,11 +422,8 @@ class SharedConfigMixin():
def config(self, key, default=None, *, sentinel=object()):
value = Extractor.config(self, key, sentinel)
if value is sentinel:
cat, self.category = self.category, self.basecategory
value = Extractor.config(self, key, default)
self.category = cat
return value
return value if value is not sentinel else config.interpolate(
("extractor", self.basecategory, self.subcategory), key, default)
def generate_extractors(extractor_data, symtable, classes):