Skip to content

Remove unnecessary while in SocketIO.readinto#111057

Merged
serhiy-storchaka merged 1 commit intopython:mainfrom
sc07kvm:remove_unnecessary_while
Oct 19, 2023
Merged

Remove unnecessary while in SocketIO.readinto#111057
serhiy-storchaka merged 1 commit intopython:mainfrom
sc07kvm:remove_unnecessary_while

Conversation

@sc07kvm
Copy link
Copy Markdown
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
Copy Markdown

ghost commented Oct 19, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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