Skip to content

Commit b177f02

Browse files
author
Kapustin Aleksandr
committed
Deletion should be in reversed order
1 parent 9f2c4b3 commit b177f02

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

kubernetes_asyncio/utils/delete_from_yaml.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
)
2727

2828

29-
def delete_from_yaml(
3029
async def delete_from_yaml(
3130
k8s_client,
3231
yaml_file,
@@ -59,7 +58,7 @@ async def delete_from_yaml(
5958
with open(path.abspath(yaml_file)) as f:
6059
yml_document_all = yaml.safe_load_all(f)
6160
failures = []
62-
for yml_document in yml_document_all:
61+
for yml_document in reversed(list(yml_document_all)):
6362
try:
6463
# call delete from dict function
6564
await delete_from_dict(

0 commit comments

Comments
 (0)