fix NestedMessage encoding

This commit is contained in:
Maximilian Hils 2016-06-06 13:39:38 -07:00
parent 6447c8ae22
commit 2ee5e8ef0e
2 changed files with 2 additions and 2 deletions

View File

@ -555,7 +555,7 @@ class NestedMessage(Token):
try: try:
self.parsed = self.nest_type( self.parsed = self.nest_type(
self.nest_type.expr().parseString( self.nest_type.expr().parseString(
value.val, value.val.decode(),
parseAll=True parseAll=True
) )
) )

View File

@ -324,7 +324,7 @@ def test_user_agent():
def test_nested_response(): def test_nested_response():
e = http.NestedResponse.expr() e = http.NestedResponse.expr()
v = e.parseString("s'200'")[0] v = e.parseString("s'200'")[0]
assert v.value.val == "200" assert v.value.val == b"200"
tutils.raises( tutils.raises(
language.ParseException, language.ParseException,
e.parseString, e.parseString,