Skip to content

Commit

Permalink
fix: remove new lines in logging msg
Browse files Browse the repository at this point in the history
  • Loading branch information
peppelinux committed Jan 2, 2024
1 parent 59673ef commit f75b6df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pyeudiw/satosa/dpop.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ def _request_endpoint_dpop(self, context: Context, *args) -> Union[JsonResponse,
try:
WalletInstanceAttestationHeader(**_head)
except ValidationError as e:
self._log_warning(context, message=f"[FOUND WIA] Invalid Headers: {_head}! \nValidation error: {e}")
self._log_warning(context, message=f"[FOUND WIA] Invalid Headers: {_head}. Validation error: {e}")
except Exception as e:
self._log_warning(context, message=f"[FOUND WIA] Invalid Headers: {_head}! \nUnexpected error: {e}")
self._log_warning(context, message=f"[FOUND WIA] Invalid Headers: {_head}. Unexpected error: {e}")

try:
WalletInstanceAttestationPayload(**wia)
except ValidationError as e:
_msg = f"[FOUND WIA] Invalid WIA: {wia}! \nValidation error: {e}"
_msg = f"[FOUND WIA] Invalid WIA: {wia}. Validation error: {e}"
self._log_warning(context, message=_msg)
# return self._handle_401(context, _msg, e)
except Exception as e:
_msg = f"[FOUND WIA] Invalid WIA: {wia}! \nUnexpected error: {e}"
_msg = f"[FOUND WIA] Invalid WIA: {wia}. Unexpected error: {e}"
self._log_warning(context, message=_msg)
# return self._handle_401(context, _msg, e)

Expand Down
3 changes: 2 additions & 1 deletion pyeudiw/trust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def discovery(self, entity_id: str, entity_configuration: EntityStatement | None
is_good = tcbuilder.is_valid
if not is_good:
raise DiscoveryFailedError(
f"Discovery failed for entity {entity_id}\nwith configuration {entity_configuration}")
f"Discovery failed for entity {entity_id} with configuration {entity_configuration}"
)

@staticmethod
def build_trust_chain_for_entity_id(storage: DBEngine, entity_id, entity_configuration, httpc_params):
Expand Down

0 comments on commit f75b6df

Please sign in to comment.