diff options
author | Bryan Henry <bryanhenry@google.com> | 2018-04-16 15:37:15 -0700 |
---|---|---|
committer | Bryan Henry <bryanhenry@google.com> | 2018-04-16 15:37:15 -0700 |
commit | b4d7de5b3658155ffdbc95de4b67ecc3fb185d13 (patch) | |
tree | 1f8d766ed8dfe8439564356e1131f83690f823e5 | |
parent | 42ce7943e1f213953d9ddfbeee1308d95554509c (diff) | |
download | bpt-b4d7de5b3658155ffdbc95de4b67ecc3fb185d13.tar.gz |
Change bpttool Python shebang line to use /usr/bin/env
Also check that Python version is at least 2.6 since bpttool uses modern
exception syntax.
Bug: 72837107
Test: m droid
Change-Id: I3f282e0314037be281641b99675a41b9bc245d73
-rwxr-xr-x | bpttool | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python # Copyright 2016, The Android Open Source Project # @@ -28,6 +28,10 @@ import sys import uuid import zlib +# Python 2.6 required for modern exception syntax +if sys.hexversion < 0x02060000: + print >> sys.stderr, "Python 2.6 or newer is required." + sys.exit(1) # Keywords used in JSON files. JSON_KEYWORD_SETTINGS = 'settings' |