Skip to content

Commit

Permalink
Deletion should be in reversed order
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapustin Aleksandr committed Feb 7, 2023
1 parent 9f2c4b3 commit b177f02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kubernetes_asyncio/utils/delete_from_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
)


def delete_from_yaml(
async def delete_from_yaml(
k8s_client,
yaml_file,
Expand Down Expand Up @@ -59,7 +58,7 @@ async def delete_from_yaml(
with open(path.abspath(yaml_file)) as f:
yml_document_all = yaml.safe_load_all(f)
failures = []
for yml_document in yml_document_all:
for yml_document in reversed(list(yml_document_all)):
try:
# call delete from dict function
await delete_from_dict(
Expand Down

0 comments on commit b177f02

Please sign in to comment.