Skip to content

Commit 3d7e0b9

Browse files
committed
Remove spurious exception logging
These two `logger.exception` calls are both incorrect, because neither are in an `except` block - which means that they will log a stacktrace for whatever the most recent exception was (which may be wholly unrelated).
1 parent e5d0b4f commit 3d7e0b9

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/saml2/response.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,6 @@ def loads(self, xmldata, decode=True, origxml=None):
526526
try:
527527
if not self.check_subject_confirmation_in_response_to(
528528
self.in_response_to):
529-
logger.exception(
530-
"Unsolicited response %s" % self.in_response_to)
531529
raise UnsolicitedResponse(
532530
"Unsolicited response: %s" % self.in_response_to)
533531
except AttributeError:
@@ -536,8 +534,6 @@ def loads(self, xmldata, decode=True, origxml=None):
536534
# Should check that I haven't seen this before
537535
pass
538536
else:
539-
logger.exception(
540-
"Unsolicited response %s" % self.in_response_to)
541537
raise UnsolicitedResponse(
542538
"Unsolicited response: %s" % self.in_response_to)
543539

0 commit comments

Comments
 (0)