Ensure get_requests_for_local_unit doesn't fail on incomplete relation

This is a rebuild/make sync for charms to pickup the fix in charmhelpers to fix
any inadvertant accesses of ['ca'] in the relation data before it is available
from vault in the certificates relation.  Fix in charmhelpers is in [1].

[1] https://github.com/juju/charm-helpers/pull/824
Closes-Bug: #2028683

Change-Id: Ie05a9ff536700282dc0c66816b50efee5da62767
This commit is contained in:
Alex Kavanagh 2023-08-04 17:16:42 +01:00
parent 4bc15968fe
commit 40782db848
2 changed files with 3 additions and 2 deletions

View File

@ -529,7 +529,8 @@ def kv():
env_var = os.environ.get("CHARM_HELPERS_TESTMODE", "auto").lower()
if env_var not in ["auto", "no", "yes"]:
logging.warning(f"Unknown value for CHARM_HELPERS_TESTMODE '{env_var}', assuming 'no'")
logging.warning("Unknown value for CHARM_HELPERS_TESTMODE '%s'"
", assuming 'no'", env_var)
env_var = "no"
if env_var == "no":

View File

@ -52,7 +52,7 @@ def _snap_exec(commands):
:param commands: List commands
:return: Integer exit code
"""
assert type(commands) == list
assert isinstance(commands, list)
retry_count = 0
return_code = None