diff options
author | Dave Brondsema <dave@brondsema.net> | 2020-10-12 08:25:18 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-12 13:25:18 +0100 |
commit | 652112c1d99a47809ef0dd8ba9992179262fb3d8 (patch) | |
tree | 3448afd8a874375f3f00dc7a34591d7e5cfa6f09 /paste/exceptions/errormiddleware.py | |
parent | 0370a8368fb5e2019dce4261c8a113f6cd41347e (diff) | |
download | paste-git-652112c1d99a47809ef0dd8ba9992179262fb3d8.tar.gz |
Wsgi.errors is text (#62)
* Update next() to work with py3
* wsgi.errors is supposed to be text, fixes ErrorMiddleware on py3
Diffstat (limited to 'paste/exceptions/errormiddleware.py')
-rw-r--r-- | paste/exceptions/errormiddleware.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/paste/exceptions/errormiddleware.py b/paste/exceptions/errormiddleware.py index 95c1261..9b533c5 100644 --- a/paste/exceptions/errormiddleware.py +++ b/paste/exceptions/errormiddleware.py @@ -221,7 +221,7 @@ class CatchingIter(object): if self.closed: raise StopIteration try: - return self.app_iterator.next() + return next(self.app_iterator) except StopIteration: self.closed = True close_response = self._close() @@ -386,8 +386,6 @@ def handle_exception(exc_info, error_stream, html=True, else: line = ('Error - %s: %s\n' % (exc_data.exception_type, exc_data.exception_value)) - if six.PY3: - line = line.encode('utf8') error_stream.write(line) if html: if debug_mode and simple_html_error: |