add utils.SensitiveSetting, to .format() hide value

This commit is contained in:
jesopo 2019-09-12 12:17:31 +01:00
parent ba0911f2e7
commit d950eb3660

View file

@ -355,6 +355,10 @@ class FunctionSetting(Setting):
def parse(self, value: str) -> typing.Any: def parse(self, value: str) -> typing.Any:
return self._func(value) return self._func(value)
class SensitiveSetting(Setting):
def format(self, value: typing.Any):
return "*"*16
class DeadlineExceededException(Exception): class DeadlineExceededException(Exception):
pass pass
def _raise_deadline(): def _raise_deadline():