Skip to content

Commit 322abd3

Browse files
authored
Tolerate ct.params==None in verbose logging (#106)
Signed-off-by: Daniel Lenski <[email protected]>
1 parent c46af04 commit 322abd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gp_saml_gui.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def log_resource_details(self, resource, request):
113113
h = rs.get_http_headers() if rs else None
114114
if h:
115115
ct, cl = h.get_content_type(), h.get_content_length()
116-
content_type, charset = ct[0], ct.params.get('charset')
116+
content_type = ct[0]
117+
charset = ct.params.get('charset') if ct.params else None
117118
content_details = '%d bytes of %s%s for ' % (cl, content_type, ('; charset='+charset) if charset else '')
118119
print('[RECEIVE] %sresource %s %s' % (content_details if h else '', m, uri), file=stderr)
119120

0 commit comments

Comments
 (0)