]> git.ipfire.org Git - thirdparty/tornado.git/commit
define and use errno_from_exception abstraction 996/head
authorDoug Goldstein <cardoe@cardoe.com>
Fri, 28 Feb 2014 14:48:26 +0000 (08:48 -0600)
committerDoug Goldstein <cardoe@cardoe.com>
Sat, 1 Mar 2014 20:22:20 +0000 (14:22 -0600)
commitf81a25e1776fd16511bf8e399500a048def920d5
treedb75fafc4c0ade0986126bdd17d72a9d7e18aa8b
parent559514de8c510dfd7c3fc5a99eb81a0aa65e1ff9
define and use errno_from_exception abstraction

If an OSError or IOError are instantiated without an errno value, e.g.
e = OSError(). The existing code would give an IndexError: tuple index
out of range. However there have been cases that the errno attribute
wasn't populated so instead of switching to it this introduces a helper
function to ensure we get the errno value through whatever means
possible.
tornado/ioloop.py
tornado/iostream.py
tornado/netutil.py
tornado/process.py
tornado/tcpserver.py
tornado/util.py