Skip to content

Commit 2cc6454

Browse files
authored
Fix exceptions handling in create_from_yaml (#298)
1 parent e8ce906 commit 2cc6454

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/example2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def main():
2222
print("Ended.")
2323
# An explicit close is necessary to stop the stream
2424
# or use async context manager like in example4.py
25-
w.close()
25+
await w.close()
2626

2727

2828
if __name__ == '__main__':

kubernetes_asyncio/utils/create_from_yaml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def create_from_yaml(
7070
**kwargs)
7171
k8s_objects.append(created)
7272
except FailToCreateError as failure:
73-
api_exceptions.extend(failure)
73+
api_exceptions.append(failure)
7474

7575
# In case we have exceptions waiting for us, raise them
7676
if api_exceptions:

0 commit comments

Comments
 (0)