Commit 93234594 authored by Victor-Gabriel Savu's avatar Victor-Gabriel Savu Committed by Commit Bot

policy_testserver: add python3 compatibility

Add python3 compatibility to policy_testserver.py. Python 2
support is maintained for autotest.

TEST=tast run <ip> policy.AllowDinosaurEasterEgg with python 2 and 3

Bug: chromium:1041448
Change-Id: If8e7d5163d9bc753c17f5dae8731f64652810675
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2206636Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Commit-Queue: Victor-Gabriel Savu <vsavu@google.com>
Cr-Commit-Position: refs/heads/master@{#770507}
parent 27189b4f
......@@ -56,7 +56,7 @@ def Bitstring(value):
Returns:
encoded TLV value.
"""
return Data(BIT_STRING, '\x00' + value)
return Data(BIT_STRING, b'\x00' + value)
def Sequence(values):
"""Encodes a sequence of other values.
......@@ -66,4 +66,4 @@ def Sequence(values):
Returns:
encoded TLV value.
"""
return Data(SEQUENCE, ''.join(values))
return Data(SEQUENCE, b''.join(values))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment