Redact sensitive info so that it doesn't get logged

main
Bob Mottram 2022-02-24 11:37:35 +00:00
parent 5f5fd75f57
commit 1c31d54636
1 changed files with 4 additions and 0 deletions

View File

@ -102,6 +102,8 @@ def _get_json_request(session, url: str, domain_full: str, session_headers: {},
elif result.status_code == 410:
print('WARN: get_json no longer available url: ' + url)
else:
if session_headers.get('Authorization'):
session_headers['Authorization'] = 'REDACTED'
print('WARN: get_json url: ' + url +
' failed with error code ' +
str(result.status_code) +
@ -716,6 +718,8 @@ def get_method(method_name: str, xml_str: str,
elif result.status_code == 410:
print('WARN: get_method no longer available url: ' + url)
else:
if session_headers.get('Authorization'):
session_headers['Authorization'] = 'REDACTED'
print('WARN: get_method url: ' + url +
' failed with error code ' +
str(result.status_code) +