- Notifications
You must be signed in to change notification settings - Fork 166
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Whilst iterating the list, generation is dropped in the call to Bucket.delete_blob() (if Blob is passed in it should be a passthrough) resulting in much gnashing of teeth...
python-storage/google/cloud/storage/bucket.py
Lines 1787 to 1806 in 9e5329c
| for blob in blobs: | |
| try: | |
| blob_name = blob | |
| if not isinstance(blob_name, str): | |
| blob_name = blob.name | |
| self.delete_blob( | |
| blob_name, | |
| client=client, | |
| if_generation_match=next(if_generation_match, None), | |
| if_generation_not_match=next(if_generation_not_match, None), | |
| if_metageneration_match=next(if_metageneration_match, None), | |
| if_metageneration_not_match=next(if_metageneration_not_match, None), | |
| timeout=timeout, | |
| retry=retry, | |
| ) | |
| except NotFound: | |
| if on_error is not None: | |
| on_error(blob) | |
| else: | |
| raise |
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the googleapis/python-storage API.Issues related to the googleapis/python-storage API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.