This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Missing "as err" in Lib/socket.py
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: UnboundLocalError in socket._sendfile_use_sendfile
View: 26384
Assigned To: Nosy List: Tobias Burnus (PDF), berker.peksag
Priority: normal Keywords:

Created on 2016-07-01 10:25 by Tobias Burnus (PDF), last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg269656 - (view) Author: Tobias Burnus (PDF) (Tobias Burnus (PDF)) Date: 2016-07-01 10:25
Cf. https://hg.python.org/cpython/file/tip/Lib/socket.py#l261

In _sendfile_use_sendfile, one has:

            try:
                fsize = os.fstat(fileno).st_size
            except OSError:
                raise _GiveupOnSendfile(err)  # not a regular file

I think the "err" in the last line will only work if there is an "as err" in the "except" line.
msg269657 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-01 10:42
This is a duplicate of issue 26384.
History
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71620
2016-07-01 10:42:42berker.peksagsetstatus: open -> closed

superseder: UnboundLocalError in socket._sendfile_use_sendfile
nosy: + berker.peksag

messages: + msg269657
type: behavior
resolution: duplicate
stage: resolved
2016-07-01 10:25:52Tobias Burnus (PDF)create