redact rather than remove

merge-requests/21/head
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:
sessionHeaders2 = sessionHeaders.copy()
if sessionHeaders2.get('Authorization'):
del sessionHeaders2['Authorization']
sessionHeaders2['Authorization'] = 'REDACTED'
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
'headers: ' + str(sessionHeaders2) + ' ' +
'params: ' + str(sessionParams))
@ -119,7 +119,7 @@ def getJson(session, url: str, headers: {}, params: {},
except ValueError as e:
sessionHeaders2 = sessionHeaders.copy()
if sessionHeaders2.get('Authorization'):
del sessionHeaders2['Authorization']
sessionHeaders2['Authorization'] = 'REDACTED'
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
'headers: ' + str(sessionHeaders2) + ' ' +
'params: ' + str(sessionParams) + ' ')