Commit 5f0ece0f authored by Pierre Dittgen's avatar Pierre Dittgen

Better error msg

parent b3ee09be
Pipeline #13178 passed with stage
in 2 minutes and 15 seconds
......@@ -86,7 +86,7 @@ def download_table(table_code):
try:
json_response = json.loads(response.content)
except ValueError as e:
print('Response is not JSON!')
print('{}\n-> Response is not JSON, ignoring table {}!'.format(url, table_code))
raise e
if isinstance(json_response, list):
# Series list
......@@ -101,6 +101,7 @@ def download_table(table_code):
assert table_code
url = DOWNLOAD_TABLE_URL.format(table_code)
print('URL =', url)
# Try to get table, waiting a little each time to let the server process request
log.debug("Get {!r}".format(url))
waited_time = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment