From 0e581c086a8a951b1d7863ae552340809ef75300 Mon Sep 17 00:00:00 2001 From: Steve Date: Wed, 14 Jul 2021 22:53:40 -0400 Subject: [PATCH] Update to remove download_as_string() --- CHANGELOG.md | 2 +- gsecrets/client.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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()