From 322abd37cbc92b17e78c49ed140652cb6bdf2c71 Mon Sep 17 00:00:00 2001 From: Ryan Libby Date: Wed, 4 Sep 2024 13:17:53 -0700 Subject: [PATCH] Tolerate ct.params==None in verbose logging (#106) Signed-off-by: Daniel Lenski --- gp_saml_gui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gp_saml_gui.py b/gp_saml_gui.py index f3ad169..6d00695 100755 --- a/gp_saml_gui.py +++ b/gp_saml_gui.py @@ -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)