Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1555: reload missing properties before blob download #1559

Merged
merged 3 commits into from
Mar 3, 2016
Merged

#1555: reload missing properties before blob download #1559

merged 3 commits into from
Mar 3, 2016

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Mar 2, 2016

Cleaner alternative to PR #1556, with coverage.

@tseaver tseaver added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the Cloud Storage API. labels Mar 2, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 2, 2016
@@ -287,6 +287,9 @@ def download_to_file(self, file_obj, client=None):
:raises: :class:`gcloud.exceptions.NotFound`
"""
client = self._require_client(client)
if self.media_link is None: # not yet loaded
self.reload()

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@dhermes
Copy link
Contributor

dhermes commented Mar 3, 2016

LGTM pending Travis

tseaver added a commit that referenced this pull request Mar 3, 2016
#1555: reload missing properties before blob download
@tseaver tseaver merged commit cba090e into googleapis:master Mar 3, 2016
@tseaver tseaver deleted the 1555-reload_on_missing_media_link branch March 3, 2016 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. cla: yes This human has signed the Contributor License Agreement. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants