Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-= float operation used on None with timeout variable #3

Open
Mo-to opened this issue Sep 9, 2022 · 0 comments
Open

-= float operation used on None with timeout variable #3

Mo-to opened this issue Sep 9, 2022 · 0 comments

Comments

@Mo-to
Copy link

Mo-to commented Sep 9, 2022

In the loop in lines:

nostale_utils/utils.py

Lines 183 to 187 in e872596

while result is None and (timeout is None or timeout > 0):
await asyncio.sleep(0.05)
timeout -= 0.05
return result

If the variable timeout is None the operation timeout -= 0.05 would cause an error because timeout is None.
Change line

timeout -= 0.05

to:

if timeout is not None:
     timeout -= 0.05
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

No branches or pull requests

1 participant