diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d72ad..f82a709 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Changelog Development ----------- -* Placeholder +* Change download_as_string() to download_as_bytes() due to deprecation. 1.3.1 ----- diff --git a/gsecrets/client.py b/gsecrets/client.py index e2f0532..9f707c6 100644 --- a/gsecrets/client.py +++ b/gsecrets/client.py @@ -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"] @@ -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()