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

2016-07-01 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 26384.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> UnboundLocalError in socket._sendfile_use_sendfile
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2016-07-01 Thread Tobias Burnus (PDF)

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com