Commit 2432586a authored by Bruno Duyé's avatar Bruno Duyé

Download: fix --limit_nb_datasets option

parent ea5b8595
......@@ -115,6 +115,7 @@ def main():
# Download series data and write series file
if args['--limit_nb_datasets'] and nb_tables_downloaded >= int(args['--limit_nb_datasets']):
nb_tables_downloaded += 1
for frequency_dict in dataset_frequencies:
frequency_code = frequency_dict['FrequencyID']
url = API_URLs['series_data'].format(api_user_id=api_user_id, appendix_code=appendix_code,
......@@ -124,7 +125,6 @@ def main():
dataset_json = get_from_api(url, raise_on_errors=False)
if dataset_json:
write_json_file(dataset_filepath, dataset_json)
nb_tables_downloaded += 1
'dataset_code': dataset_code,
'dimension_label': 'FREQ',
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