redact rather than remove

main
Bob Mottram 2021-03-02 20:44:00 +00:00
parent af8c8012eb
commit 74dc6e10c4
1 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ def getJson(session, url: str, headers: {}, params: {},
except requests.exceptions.RequestException as e: except requests.exceptions.RequestException as e:
sessionHeaders2 = sessionHeaders.copy() sessionHeaders2 = sessionHeaders.copy()
if sessionHeaders2.get('Authorization'): if sessionHeaders2.get('Authorization'):
del sessionHeaders2['Authorization'] sessionHeaders2['Authorization'] = 'REDACTED'
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' + print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
'headers: ' + str(sessionHeaders2) + ' ' + 'headers: ' + str(sessionHeaders2) + ' ' +
'params: ' + str(sessionParams)) 'params: ' + str(sessionParams))
@ -119,7 +119,7 @@ def getJson(session, url: str, headers: {}, params: {},
except ValueError as e: except ValueError as e:
sessionHeaders2 = sessionHeaders.copy() sessionHeaders2 = sessionHeaders.copy()
if sessionHeaders2.get('Authorization'): if sessionHeaders2.get('Authorization'):
del sessionHeaders2['Authorization'] sessionHeaders2['Authorization'] = 'REDACTED'
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' + print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
'headers: ' + str(sessionHeaders2) + ' ' + 'headers: ' + str(sessionHeaders2) + ' ' +
'params: ' + str(sessionParams) + ' ') 'params: ' + str(sessionParams) + ' ')