diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-09-17 20:22:06 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-09-17 20:22:06 (GMT) |
commit | bcfb35f80d9d1f87d9fa6993c1d3bc35dd5db865 (patch) | |
tree | 8210a1031ab648ac60c6fa391f89e8964cec1bb2 /Lib/socket.py | |
parent | 9a1c91a10d16b603d57fbc97bc54699acee3f052 (diff) | |
download | cpython-bcfb35f80d9d1f87d9fa6993c1d3bc35dd5db865.zip cpython-bcfb35f80d9d1f87d9fa6993c1d3bc35dd5db865.tar.gz cpython-bcfb35f80d9d1f87d9fa6993c1d3bc35dd5db865.tar.bz2 |
Issue #26384: Fix UnboundLocalError in socket._sendfile_use_sendfile
Diffstat (limited to 'Lib/socket.py')
-rw-r--r-- | Lib/socket.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index 6dddfe1..a9cab32 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -258,7 +258,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 |