From 8de5f6c11bd74afdf53cc8aa8013593a91b71e13 Mon Sep 17 00:00:00 2001 From: "Keerthan Reddy Mala (kmala)" Date: Wed, 3 Aug 2016 12:22:36 -0600 Subject: [PATCH] fix(secret): handle the secret value if it is None --- rootfs/scheduler/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs/scheduler/__init__.py b/rootfs/scheduler/__init__.py index b9b07ed7f..360753660 100644 --- a/rootfs/scheduler/__init__.py +++ b/rootfs/scheduler/__init__.py @@ -1209,6 +1209,9 @@ def get_secret(self, namespace, name): # decode the base64 data secrets = response.json() for key, value in secrets['data'].items(): + if value is None: + secrets['data'][key] = "" + continue value = base64.b64decode(value) value = value if isinstance(value, bytes) else bytes(value, 'UTF-8') secrets['data'][key] = value.decode(encoding='UTF-8')