Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gcloud/storage/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def list_buckets(project=None, max_results=None, page_token=None, prefix=None,
# class has it as a reserved property.
if page_token is not None:
result.next_page_token = page_token
return iter(result)
return result


def get_bucket(bucket_name, connection=None):
Expand Down
7 changes: 6 additions & 1 deletion gcloud/storage/blob.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,14 @@ def exists(self, connection=None):
# We only need the status code (200 or not) so we seek to
# minimize the returned payload.
query_params = {'fields': 'name'}
# We intentionally pass `_target_object=None` since fields=name
# would limit the local properties.
connection.api_request(method='GET', path=self.path,
query_params=query_params,
_target_object=self)
_target_object=None)
# NOTE: This will not fail immediately in a batch. However, when
# Batch.finish() is called, the resulting `NotFound` will be
# raised.
return True
except NotFound:
return False
Expand Down