Revert wptrunner 496353104e7ee0969e316c12caf3dc2988efb8e8

This commit is contained in:
Josh Matthews 2016-10-07 00:57:07 -04:00
parent d6318c8ea5
commit a9c2dda299

View file

@ -16,8 +16,6 @@
# TODO: keep comments in the tree # TODO: keep comments in the tree
from __future__ import unicode_literals
import types import types
from cStringIO import StringIO from cStringIO import StringIO
@ -50,9 +48,8 @@ atoms = {"True": True,
"False": False, "False": False,
"Reset": object()} "Reset": object()}
def decode(s): def decode(byte_str):
assert isinstance(s, unicode) return byte_str.decode("utf8")
return s
def precedence(operator_node): def precedence(operator_node):
@ -477,7 +474,7 @@ class Tokenizer(object):
value += self.escape_value(c) value += self.escape_value(c)
self.consume() self.consume()
return unichr(value) return unichr(value).encode("utf8")
def escape_value(self, c): def escape_value(self, c):
if '0' <= c <= '9': if '0' <= c <= '9':