|
|
@ -21,14 +21,14 @@ try: |
|
|
|
response = urllib.request.urlopen(request) |
|
|
|
|
|
|
|
except HTTPError as e: |
|
|
|
print('The server couldn\'t fulfill the request.') |
|
|
|
print('Error code: ', e.code) |
|
|
|
# print('The server couldn\'t fulfill the request.') |
|
|
|
# print('Error code: ', e.code) |
|
|
|
error = e.code |
|
|
|
stats['server'] = None |
|
|
|
pass |
|
|
|
except URLError as e: |
|
|
|
print('We failed to reach a server.') |
|
|
|
print('Reason: ', e.reason) |
|
|
|
# print('We failed to reach a server.') |
|
|
|
# print('Reason: ', e.reason) |
|
|
|
error = e.reason |
|
|
|
stats['server'] = None |
|
|
|
pass |
|
|
|