diff options
author | Sergiusz Bazanski <q3k@q3k.org> | 2018-05-03 01:40:15 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2018-05-03 01:40:57 -0700 |
commit | 9c665c4c2496f71231f4c60454592854182c0e65 (patch) | |
tree | bf5455a078bb76bbbebfa43f8119f5e131b6c291 | |
parent | a61def1b368a9042e346787008e12770e4e67b35 (diff) |
Make check_vdso compatible with Python 2 and 3
This makes gVisor build with `python` set to Python 3.
Fixes #8
PiperOrigin-RevId: 195216683
Change-Id: I1c8b86ad91a0844f7c3c85839d53f3fcba10813e
-rw-r--r-- | vdso/check_vdso.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vdso/check_vdso.py b/vdso/check_vdso.py index f1288e0c2..9a3142ab8 100644 --- a/vdso/check_vdso.py +++ b/vdso/check_vdso.py @@ -65,7 +65,7 @@ def CheckSegments(vdso_path): Args: vdso_path: Path to VDSO binary. """ - output = subprocess.check_output(["readelf", "-lW", vdso_path]) + output = subprocess.check_output(["readelf", "-lW", vdso_path]).decode() lines = output.split("\n") segments = [] @@ -143,7 +143,7 @@ def CheckData(vdso_path): Args: vdso_path: Path to VDSO binary. """ - output = subprocess.check_output(["readelf", "-SW", vdso_path]) + output = subprocess.check_output(["readelf", "-SW", vdso_path]).decode() lines = output.split("\n") found_text = False @@ -179,7 +179,7 @@ def CheckRelocs(vdso_path): Args: vdso_path: Path to VDSO binary. """ - output = subprocess.check_output(["readelf", "-r", vdso_path]) + output = subprocess.check_output(["readelf", "-r", vdso_path]).decode() if output.strip() != "There are no relocations in this file.": Fatal("VDSO contains relocations: %s", output) |