summaryrefslogtreecommitdiff
path: root/eventlet
diff options
context:
space:
mode:
Diffstat (limited to 'eventlet')
-rw-r--r--eventlet/green/subprocess.py4
-rw-r--r--eventlet/timeout.py2
-rw-r--r--eventlet/wsgi.py9
3 files changed, 9 insertions, 6 deletions
diff --git a/eventlet/green/subprocess.py b/eventlet/green/subprocess.py
index e47e8d9..f4d067d 100644
--- a/eventlet/green/subprocess.py
+++ b/eventlet/green/subprocess.py
@@ -21,7 +21,7 @@ if getattr(subprocess_orig, 'TimeoutExpired', None) is None:
a child process.
"""
- def __init__(self, cmd, output=None):
+ def __init__(self, timeout, cmd, output=None):
self.cmd = cmd
self.output = output
@@ -64,7 +64,7 @@ class Popen(subprocess_orig.Popen):
if status is not None:
return status
if timeout is not None and time.time() > endtime:
- raise TimeoutExpired(self.args)
+ raise TimeoutExpired(self.args, timeout)
eventlet.sleep(check_interval)
except OSError as e:
if e.errno == errno.ECHILD:
diff --git a/eventlet/timeout.py b/eventlet/timeout.py
index 5c9930a..f45c6d1 100644
--- a/eventlet/timeout.py
+++ b/eventlet/timeout.py
@@ -100,7 +100,7 @@ class Timeout(BaseException):
def __str__(self):
"""
- >>> raise Timeout
+ >>> raise Timeout # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
...
Timeout
diff --git a/eventlet/wsgi.py b/eventlet/wsgi.py
index 7ef546e..baa8eb8 100644
--- a/eventlet/wsgi.py
+++ b/eventlet/wsgi.py
@@ -98,10 +98,10 @@ class Input(object):
if self.hundred_continue_headers is not None:
# 100 Continue headers
for header in self.hundred_continue_headers:
- towrite.append('%s: %s\r\n' % header)
+ towrite.append(six.b('%s: %s\r\n' % header))
# Blank line
- towrite.append('\r\n')
+ towrite.append(b'\r\n')
self.wfile.writelines(towrite)
self.wfile = None
@@ -557,7 +557,7 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
if env.get('HTTP_EXPECT') == '100-continue':
wfile = self.wfile
- wfile_line = 'HTTP/1.1 100 Continue\r\n'
+ wfile_line = b'HTTP/1.1 100 Continue\r\n'
else:
wfile = None
wfile_line = None
@@ -579,6 +579,9 @@ class HttpProtocol(BaseHTTPServer.BaseHTTPRequestHandler):
greenio.shutdown_safe(self.connection)
self.connection.close()
+ def handle_expect_100(self):
+ return True
+
class Server(BaseHTTPServer.HTTPServer):