Skip to content

Commit

Permalink
Tolerate ct.params==None in verbose logging (#106)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
  • Loading branch information
rlibby authored Sep 4, 2024
1 parent c46af04 commit 322abd3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gp_saml_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def log_resource_details(self, resource, request):
h = rs.get_http_headers() if rs else None
if h:
ct, cl = h.get_content_type(), h.get_content_length()
content_type, charset = ct[0], ct.params.get('charset')
content_type = ct[0]
charset = ct.params.get('charset') if ct.params else None
content_details = '%d bytes of %s%s for ' % (cl, content_type, ('; charset='+charset) if charset else '')
print('[RECEIVE] %sresource %s %s' % (content_details if h else '', m, uri), file=stderr)

Expand Down

0 comments on commit 322abd3

Please sign in to comment.