Skip to content
Snippets Groups Projects
Commit 83bf2409 authored by Enzo Buthiot's avatar Enzo Buthiot
Browse files

Delete useless lines

parent cb84ff84
No related branches found
No related tags found
1 merge request!1New download
......@@ -116,24 +116,6 @@ def main():
# Download main FAO file
download_file(target_dir, url)
# Then loads datasets.json file
datasets_info_list = None
fd = open(target_dir / "datasets.json", 'rt', encoding='latin-1')
datasets_info_list = json.load(fd)['Datasets']['Dataset']
#or dataset in datasets_info_list:
#print(Path(dataset['FileLocation']).name)
zip_file = zipfile.ZipFile('/Users/EnzoButhiot/Downloads/FAOSTAT.zip', 'r')
zip_list = zip_file.namelist()
with open(str(target_dir) + "/zip_list.txt", 'w') as fd:
json.dump(zip_list, fd)
#with open(str(target_dir) + '/zipfile_list.txt', 'w') as fd:
# for name in zip_file.namelist():
# fd.write('%s\n' % name)
# print('%s' % (name))
zip_file.close()
if __name__ == '__main__':
sys.exit(main())
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