Commit 477186ee authored by Bruno Duyé's avatar Bruno Duyé

Download: adapt to some API inconsistencies

parent e0994d46
......@@ -106,7 +106,8 @@ def main():
nb_tables_downloaded = 0
# For each "table" (set of series)
for table_info in tables_list["ParamValue"]:
table_name = table_info['TableName']
table_code = table_info.get('TableName') or table_info.get('TableNumber')
assert table_code, "Error: can't find table code in table_info (dataset {!r}):\n{!r}".format(dataset_code, table_info)
log.debug("* {}".format(table_name))
# Download series data and write series file
if args['--limit_nb_tables'] and nb_tables_downloaded >= int(args['--limit_nb_tables']):
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