Actually respect default return in Exports.get_one

This commit is contained in:
jesopo 2019-04-27 14:49:18 +01:00
parent f8e933d4cc
commit 74c16a1bbe

View file

@ -32,7 +32,7 @@ class Exports(object):
def get_one(self, setting: str, default: typing.Any=None def get_one(self, setting: str, default: typing.Any=None
) -> typing.Optional[typing.Any]: ) -> typing.Optional[typing.Any]:
values = self.get_all(setting) values = self.get_all(setting)
return values[0] if values else None return values[0] if values else default
def purge_context(self, context: str): def purge_context(self, context: str):
if context in self._context_exports: if context in self._context_exports: