mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Issue #26384: Merge from 3.5
This commit is contained in:
commit
5d625cff07
3 changed files with 22 additions and 1 deletions
|
@ -268,7 +268,7 @@ class socket(_socket.socket):
|
|||
raise _GiveupOnSendfile(err) # not a regular file
|
||||
try:
|
||||
fsize = os.fstat(fileno).st_size
|
||||
except OSError:
|
||||
except OSError as err:
|
||||
raise _GiveupOnSendfile(err) # not a regular file
|
||||
if not fsize:
|
||||
return 0 # empty file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue