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

Update to remove download_as_string() #6

Merged
merged 1 commit into from Jul 15, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -4,7 +4,7 @@ Changelog
Development
-----------

* Placeholder
* Change download_as_string() to download_as_bytes() due to deprecation.

1.3.1
-----
Expand Down
4 changes: 2 additions & 2 deletions gsecrets/client.py
Expand Up @@ -63,7 +63,7 @@ def pull_keyring_configuration(self):
# TODO: error handling if this file is missing or badly configured
path = "keyring.json"
blob = self.bucket.blob(path)
keyring_configuration = blob.download_as_string()
keyring_configuration = blob.download_as_bytes()
keyring_configuration = json.loads(keyring_configuration)
self.location = keyring_configuration["location"]
self.keyring = keyring_configuration["keyring"]
Expand Down Expand Up @@ -184,7 +184,7 @@ def get(self, path):
blob = self.bucket.blob(path)

try:
ciphertext = blob.download_as_string()
ciphertext = blob.download_as_bytes()
except NotFound:
raise SecretNotFound()

Expand Down