From 0534979e617ba57aa011eaf57b0c076c67dd538c Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Tue, 22 Dec 2020 11:03:23 -0500 Subject: [PATCH] Another passing test on Python 3. --- src/allmydata/web/common_py3.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/allmydata/web/common_py3.py b/src/allmydata/web/common_py3.py index 05fc2b50b..9d4435706 100644 --- a/src/allmydata/web/common_py3.py +++ b/src/allmydata/web/common_py3.py @@ -70,6 +70,8 @@ class MultiFormatResource(resource.Resource, object): :return: The result of the selected renderer. """ t = get_arg(req, self.formatArgument, self.formatDefault) + if isinstance(t, bytes): + t = unicode(t, "ascii") renderer = self._get_renderer(t) return renderer(req)