summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/asynchronous.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2023-06-17 19:35:21 +0200
committerHelmut Grohne <helmut@subdivi.de>2023-06-18 22:44:01 +0200
commit4d52eaa4801df3f3169df8e58758bcccf22dc4de (patch)
treeb8740a88e380a750d9d2607bb39cbc759a8d7175 /wsgitools/scgi/asynchronous.py
parent682ce67b73453809237532a7ce2feee07f2900d5 (diff)
downloadwsgitools-4d52eaa4801df3f3169df8e58758bcccf22dc4de.tar.gz
drop support for Python 2.x
Diffstat (limited to 'wsgitools/scgi/asynchronous.py')
-rw-r--r--wsgitools/scgi/asynchronous.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 0b014bf..61bbc6b 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -9,13 +9,6 @@ import errno
from wsgitools.internal import bytes2str, str2bytes
from wsgitools.scgi import _convert_environ, FileWrapper
-if sys.version_info[0] >= 3:
- def exc_info_for_raise(exc_info):
- return exc_info[1].with_traceback(exc_info[2])
-else:
- def exc_info_for_raise(exc_info):
- return exc_info[0], exc_info[1], exc_info[2]
-
class SCGIConnection(asyncore.dispatcher):
"""SCGI connection class used by L{SCGIServer}."""
# connection states
@@ -147,7 +140,7 @@ class SCGIConnection(asyncore.dispatcher):
if exc_info:
if self.outheaders == True:
try:
- raise exc_info_for_raise(exc_info)
+ raise exc_info[1].with_traceback(exc_info[2])
finally:
exc_info = None
assert self.outheaders != True # unsent