removed listing of cloud storage bucket contents (#3797)

main
Chris 4 years ago committed by GitHub
parent 3e9be5baa5
commit 5841dd35ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -84,11 +84,8 @@ class CacheInteraction:
}
try:
cloud_storage_instance = get_cloud_storage_instance(cloud_provider=db_cloud_storage.provider_type, **details)
cloud_storage_instance.initialize_content()
for item in reader:
file_name = f"{item['name']}{item['extension']}"
if file_name not in cloud_storage_instance:
raise Exception('{} file was not found on a {} storage'.format(file_name, cloud_storage_instance.name))
with NamedTemporaryFile(mode='w+b', prefix='cvat', suffix=file_name.replace(os.path.sep, '#'), delete=False) as temp_file:
source_path = temp_file.name
buf = cloud_storage_instance.download_fileobj(file_name)

Loading…
Cancel
Save