summaryrefslogtreecommitdiff
path: root/libsparse
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2021-08-17 15:02:00 -0700
committerElliott Hughes <enh@google.com>2021-08-17 15:02:00 -0700
commit726a6a915921d08b6429c1ef5598dad2ce1840a0 (patch)
treed4bbb54e4ab8695110951959053495484e88b339 /libsparse
parent489f09abd4cbbea26c45a189ce4d26434d437e59 (diff)
downloadcore-726a6a915921d08b6429c1ef5598dad2ce1840a0.tar.gz
libsparse: python3.
Test: treehugger Test: ran simg_dump.py on a file created by img2simg Change-Id: I999747867733a2e789c0da95add0bba83c36133f
Diffstat (limited to 'libsparse')
-rw-r--r--libsparse/Android.bp6
-rwxr-xr-xlibsparse/simg_dump.py5
2 files changed, 5 insertions, 6 deletions
diff --git a/libsparse/Android.bp b/libsparse/Android.bp
index 0b4b640ad..3f9aeb28a 100644
--- a/libsparse/Android.bp
+++ b/libsparse/Android.bp
@@ -85,11 +85,11 @@ python_binary_host {
srcs: ["simg_dump.py"],
version: {
py2: {
- embedded_launcher: true,
- enabled: true,
+ enabled: false,
},
py3: {
- enabled: false,
+ embedded_launcher: true,
+ enabled: true,
},
},
}
diff --git a/libsparse/simg_dump.py b/libsparse/simg_dump.py
index 82a03ad95..b0b3b2259 100755
--- a/libsparse/simg_dump.py
+++ b/libsparse/simg_dump.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright (C) 2012 The Android Open Source Project
#
@@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-from __future__ import print_function
import csv
import getopt
import hashlib
@@ -47,7 +46,7 @@ def main():
opts, args = getopt.getopt(sys.argv[1:],
"vsc:",
["verbose", "showhash", "csvfile"])
- except getopt.GetoptError, e:
+ except getopt.GetoptError as e:
print(e)
usage(me)
for o, a in opts: