Skip to content

Commit 45a1488

Browse files
author
Matt Pryor
authored
Merge pull request #13 from stackhpc/fix/empty-values
Return empty dict when values are empty
2 parents daa17ff + a5e117b commit 45a1488

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

pyhelm3/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def pull_chart(
9898
devel: bool = False,
9999
repo: t.Optional[str] = None,
100100
version: t.Optional[str] = None
101-
) -> contextlib.AbstractAsyncContextManager[pathlib.Path]:
101+
) -> t.AsyncIterator[pathlib.Path]:
102102
"""
103103
Context manager that pulls the specified chart and yields a chart object
104104
whose ref is the unpacked chart directory.
@@ -323,7 +323,7 @@ async def should_install_or_upgrade_release(
323323
if revision_chart.version != chart.metadata.version:
324324
return True
325325
# If the values have changed from the deployed release, we should redeploy
326-
revision_values = (await current_revision.values()) or {}
326+
revision_values = await current_revision.values()
327327
if revision_values != values:
328328
return True
329329
# If the chart and values are the same, there is nothing to do

pyhelm3/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ async def get_values(
474474
command.extend(["--revision", revision])
475475
if namespace:
476476
command.extend(["--namespace", namespace])
477-
return json.loads(await self.run(command))
477+
return json.loads(await self.run(command)) or {}
478478

479479
async def history(
480480
self,

0 commit comments

Comments
 (0)