Update run_on_app to be python3
Change-Id: I770818b21cd90dd7a553186f7cf6d1ba2ef6260c
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index 983ce6d..14310b6 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
diff --git a/tools/utils.py b/tools/utils.py
index ee49000..e02cedb 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -512,7 +512,7 @@
def check_java_version():
cmd= [jdk.GetJavaExecutable(), '-version']
output = subprocess.check_output(cmd, stderr = subprocess.STDOUT)
- m = re.search('openjdk version "([^"]*)"', output)
+ m = re.search('openjdk version "([^"]*)"', output.decode('utf-8'))
if m is None:
raise Exception("Can't check java version: no version string in output"
" of 'java -version': '{}'".format(output))