diff options
| author | Gael Pasgrimaud <gael@gawel.org> | 2013-02-21 20:38:03 +0100 |
|---|---|---|
| committer | Gael Pasgrimaud <gael@gawel.org> | 2013-02-21 20:38:03 +0100 |
| commit | e35b0f12bc1cdaec3f1ac8ca67c2af52a46655aa (patch) | |
| tree | 51b119349e7cc228b1e1bd908795d633a09499e0 /webtest/debugapp.py | |
| parent | 72ba535d06e950b1f20002b1d83408496fa25012 (diff) | |
| download | webtest-e35b0f12bc1cdaec3f1ac8ca67c2af52a46655aa.tar.gz | |
fix test for py3X
Diffstat (limited to 'webtest/debugapp.py')
| -rw-r--r-- | webtest/debugapp.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webtest/debugapp.py b/webtest/debugapp.py index 8b1231b..ca2af47 100644 --- a/webtest/debugapp.py +++ b/webtest/debugapp.py @@ -28,7 +28,10 @@ class DebugApp(object): raise Exception('Exception requested') if 'errorlog' in req.GET: - req.environ['wsgi.errors'].write(req.GET['errorlog']) + log = req.GET['errorlog'] + if not six.PY3 and not isinstance(log, six.binary_type): + log = log.encode('utf8') + req.environ['wsgi.errors'].write(log) status = str(req.GET.get('status', '200 OK')) |
