We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1901a47 + 1bd91aa commit 859bfe3Copy full SHA for 859bfe3
etherscan/client.py
@@ -47,7 +47,12 @@ def connect(self):
47
except requests.exceptions.ConnectionError:
48
return "Connection refused"
49
if req.status_code == 200:
50
- return json.loads(req.text)
+ # Check for empty response
51
+ if req.text:
52
+ return json.loads(req.text)
53
+ else:
54
+ print("Invalid Request")
55
+ exit()
56
else:
57
print("problem with connection, status code: ", req.status_code)
58
exit()
0 commit comments