From 4b59ff1aac4da0a5845f5b9e0de0e832b9cd3ec3 Mon Sep 17 00:00:00 2001 From: Nico Angelo Date: Mon, 24 Apr 2023 09:54:53 +0200 Subject: [PATCH] fix --- src/dockerlogin.py | 4 ++-- src/utils/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dockerlogin.py b/src/dockerlogin.py index 9341ec3..a03104f 100644 --- a/src/dockerlogin.py +++ b/src/dockerlogin.py @@ -60,7 +60,7 @@ def create_managed_registry_secret(spec, name, namespace, logger, **kwargs): secret = create_dockerlogin( logger, secret, - secret_json_object, + secret_json_object["data"], username_ref, password_ref, registry) @@ -132,7 +132,7 @@ def update_managed_registry_secret( secret = create_dockerlogin( logger, secret, - secret_json_object, + secret_json_object["data"], username_ref, password_ref, registry) diff --git a/src/utils/utils.py b/src/utils/utils.py index aac8c61..62ad8a6 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -33,7 +33,7 @@ def command_wrapper(logger, command, use_success: bool = True): env=system_env) out, err = sp.communicate() resp = json.loads(out.decode(encoding='UTF-8')) - if os.environ["DEBUG"] != None: + if "DEBUG" in system_env: logger.info(resp) if resp["success"] != None and (not use_success or (use_success and resp["success"] == True)): return resp