mirror of https://gitlab.com/bashrc2/epicyon
Remove any authorization details from debug
parent
7b517035d0
commit
af8c8012eb
10
session.py
10
session.py
|
@ -109,13 +109,19 @@ def getJson(session, url: str, headers: {}, params: {},
|
||||||
params=sessionParams, timeout=timeoutSec)
|
params=sessionParams, timeout=timeoutSec)
|
||||||
return result.json()
|
return result.json()
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
|
sessionHeaders2 = sessionHeaders.copy()
|
||||||
|
if sessionHeaders2.get('Authorization'):
|
||||||
|
del sessionHeaders2['Authorization']
|
||||||
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
||||||
'headers: ' + str(sessionHeaders) + ' ' +
|
'headers: ' + str(sessionHeaders2) + ' ' +
|
||||||
'params: ' + str(sessionParams))
|
'params: ' + str(sessionParams))
|
||||||
print(e)
|
print(e)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
|
sessionHeaders2 = sessionHeaders.copy()
|
||||||
|
if sessionHeaders2.get('Authorization'):
|
||||||
|
del sessionHeaders2['Authorization']
|
||||||
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
||||||
'headers: ' + str(sessionHeaders) + ' ' +
|
'headers: ' + str(sessionHeaders2) + ' ' +
|
||||||
'params: ' + str(sessionParams) + ' ')
|
'params: ' + str(sessionParams) + ' ')
|
||||||
print(e)
|
print(e)
|
||||||
except SocketError as e:
|
except SocketError as e:
|
||||||
|
|
Loading…
Reference in New Issue