*: make logger not use .error

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-27 15:43:26 +02:00
parent ed49d7824e
commit 1af3357826
2 changed files with 3 additions and 3 deletions

View File

@ -160,7 +160,7 @@ class FlowImporter:
try: try:
model: SerializerModel = apps.get_model(model_app_label, model_name) model: SerializerModel = apps.get_model(model_app_label, model_name)
except LookupError: except LookupError:
self.logger.error( self.logger.warning(
"app or model does not exist", app=model_app_label, model=model_name "app or model does not exist", app=model_app_label, model=model_name
) )
return False return False
@ -168,7 +168,7 @@ class FlowImporter:
try: try:
serializer = self._validate_single(entry) serializer = self._validate_single(entry)
except EntryInvalidError as exc: except EntryInvalidError as exc:
self.logger.error("entry not valid", entry=entry, error=exc) self.logger.warning("entry not valid", entry=entry, error=exc)
return False return False
model = serializer.save() model = serializer.save()

View File

@ -201,7 +201,7 @@ class DockerServiceConnection(OutpostServiceConnection):
) )
client.containers.list() client.containers.list()
except DockerException as exc: except DockerException as exc:
LOGGER.error(exc) LOGGER.warning(exc)
raise ServiceConnectionInvalid from exc raise ServiceConnectionInvalid from exc
return client return client