Use Pydantic to validate the server config file.

This commit is contained in:
grossmj
2021-04-12 17:02:23 +09:30
parent 478119b40d
commit 30ebae207f
61 changed files with 871 additions and 695 deletions

View File

@ -121,9 +121,9 @@ class Compute:
else:
self._user = user.strip()
if password:
self._password = password.strip()
self._password = password
try:
self._auth = aiohttp.BasicAuth(self._user, self._password, "utf-8")
self._auth = aiohttp.BasicAuth(self._user, self._password.get_secret_value(), "utf-8")
except ValueError as e:
log.error(str(e))
else: