Fix python interpreter name
authorAndroid Tools Maintainers <android-tools-devel@lists.alioth.debian.org>
Tue, 31 Jan 2023 07:58:29 +0000 (07:58 +0000)
committerRoger Shimizu <rosh@debian.org>
Tue, 31 Jan 2023 07:58:29 +0000 (07:58 +0000)
Forwarded: not-needed

Gbp-Pq: Topic art
Gbp-Pq: Name python3-gen_mterp.patch

art/runtime/interpreter/mterp/common/gen_setup.py
art/runtime/interpreter/mterp/gen_mterp.py

index 2684ab255fcc9e193d7a9b8c62c140c9e905f76b..ac0606b4c694100a72e93afe54b8c0a9caacc63e 100644 (file)
@@ -19,7 +19,7 @@
 # the templated snippets. Those define all the helper functions used below.
 
 import sys, re
-from cStringIO import StringIO
+from io import StringIO
 
 out = StringIO()  # File-like in-memory buffer.
 handler_size_bytes = "MTERP_HANDLER_SIZE"
index 5d25955701289fa661195d63b96a2633633ff9bb..8534e9948b611a5185f383486b9b67a4d87b0c9e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (C) 2016 The Android Open Source Project
 #
@@ -15,7 +15,7 @@
 # limitations under the License.
 
 import sys, re, os
-from cStringIO import StringIO
+from io import StringIO
 
 SCRIPT_DIR = os.path.dirname(sys.argv[0])
 # This file is included verbatim at the start of the in-memory python script.
@@ -37,9 +37,9 @@ def getOpcodeList():
   opcode_fp.close()
 
   if len(opcodes) != NUM_PACKED_OPCODES:
-    print "ERROR: found %d opcodes in Interp.h (expected %d)" \
-        % (len(opcodes), NUM_PACKED_OPCODES)
-    raise SyntaxError, "bad opcode count"
+    print("ERROR: found %d opcodes in Interp.h (expected %d)" \
+        % (len(opcodes), NUM_PACKED_OPCODES))
+    raise SyntaxError("bad opcode count")
   return opcodes
 
 indent_re = re.compile(r"^%( *)")