Skip to content

Commit c378151

Browse files
author
Roland Hedberg
committed
Status code can be once or twice removed :-)
1 parent 846f26f commit c378151

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/saml2/response.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ def status_ok(self):
337337
if status.status_message:
338338
msg = status.status_message.text
339339
else:
340-
msg = "Unknown error"
340+
try:
341+
msg = status.status_code.status_code.value
342+
except Exception:
343+
msg = "Unknown error"
341344
raise excep(
342345
"%s from %s" % (msg, status.status_code.value,))
343346
return True

0 commit comments

Comments
 (0)