[issue27433] Missing "as err" in Lib/socket.py

Tobias Burnus (PDF) report at bugs.python.org
Fri Jul 1 06:25:52 EDT 2016


New submission from Tobias Burnus (PDF):

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.

----------
components: Library (Lib)
messages: 269656
nosy: Tobias Burnus (PDF)
priority: normal
severity: normal
status: open
title: Missing "as err" in Lib/socket.py
versions: Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27433>
_______________________________________


More information about the Python-bugs-list mailing list