Skip to content

Fix error variable not being reset when failure in a coroutine call in flags2_asyncio.py#35

Merged
ramalho merged 1 commit intofluentpython:masterfrom
charlielito:patch-1
May 19, 2025
Merged

Fix error variable not being reset when failure in a coroutine call in flags2_asyncio.py#35
ramalho merged 1 commit intofluentpython:masterfrom
charlielito:patch-1

Conversation

@charlielito
Copy link
Copy Markdown
Contributor

In the asyncio example in flags2_asyncio.py there is a bug when a call to a coroutine in the loop fails and the next one has success, the error variable doesn't get reset and it still thinks it got an error, and updates the counter[status] with the wrong value

Fix `error` variable not being reset when a successful coroutine call
@charlielito charlielito changed the title Fix error variable not being reset when a successful coroutine call in flags2_asyncio.py Fix error variable not being reset when with a failure in a coroutine call in flags2_asyncio.py Mar 26, 2023
@charlielito charlielito changed the title Fix error variable not being reset when with a failure in a coroutine call in flags2_asyncio.py Fix error variable not being reset when failure in a coroutine call in flags2_asyncio.py Mar 26, 2023
@ramalho ramalho merged commit f355aa3 into fluentpython:master May 19, 2025
@ramalho
Copy link
Copy Markdown
Member

ramalho commented May 19, 2025

Thanks for this contribution, @charlielito !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants