Skip to content

Remove unnecessary while in SocketIO.readinto #111057

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

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

sc07kvm
Copy link
Contributor

@sc07kvm sc07kvm commented Oct 19, 2023

These changes remove unnecessary while left over from the commit 6e6c59b:

while True:
    try:
        return self._sock.recv_into(b)
    except timeout:
        self._timeout_occurred = True
        raise
    except InterruptedError:  // <---------- removed
        continue              // <---------- removed
    except error as e:
        if e.args[0] in _blocking_errnos:
            return None
        raise

-->

while True:
    try:
        return self._sock.recv_into(b)
    except timeout:
        self._timeout_occurred = True
        raise
    except error as e:
        if e.args[0] in _blocking_errnos:
            return None
        raise

@ghost
Copy link

ghost commented Oct 19, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Oct 19, 2023

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@sc07kvm sc07kvm force-pushed the remove_unnecessary_while branch from 5baf1cf to bc7c348 Compare October 19, 2023 06:37
@bedevere-app
Copy link

bedevere-app bot commented Oct 19, 2023

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@serhiy-storchaka
Copy link
Member

Thank you for your contribution @sc07kvm.

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
It is unnecessary after removing "continue" in 6e6c59b (bpo-42357).
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
It is unnecessary after removing "continue" in 6e6c59b (bpo-42357).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants