forked from indymedia/epicyon
Use spaces for easier debug
parent
7ee5c89ff2
commit
3330ed1601
12
session.py
12
session.py
|
@ -76,14 +76,14 @@ def getJson(session, url: str, headers: {}, params: {},
|
||||||
result = session.get(url, headers=sessionHeaders, params=sessionParams)
|
result = session.get(url, headers=sessionHeaders, params=sessionParams)
|
||||||
return result.json()
|
return result.json()
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
print('ERROR: getJson failed\nurl: ' + str(url) + '\n' +
|
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
||||||
'headers: ' + str(sessionHeaders) + '\n' +
|
'headers: ' + str(sessionHeaders) + ' ' +
|
||||||
'params: ' + str(sessionParams) + '\n')
|
'params: ' + str(sessionParams))
|
||||||
print(e)
|
print(e)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
print('ERROR: getJson failed\nurl: ' + str(url) + '\n' +
|
print('ERROR: getJson failed\nurl: ' + str(url) + ' ' +
|
||||||
'headers: ' + str(sessionHeaders) + '\n' +
|
'headers: ' + str(sessionHeaders) + ' ' +
|
||||||
'params: ' + str(sessionParams) + '\n')
|
'params: ' + str(sessionParams) + ' ')
|
||||||
print(e)
|
print(e)
|
||||||
except SocketError as e:
|
except SocketError as e:
|
||||||
if e.errno == errno.ECONNRESET:
|
if e.errno == errno.ECONNRESET:
|
||||||
|
|
Loading…
Reference in New Issue