summaryrefslogtreecommitdiffstats
path: root/tools/check_radio_versions.py
diff options
context:
space:
mode:
authorAnthony King <anthonydking@slimroms.net>2015-11-03 00:23:11 +0000
committerTom Powell <tpowell@cyngn.com>2016-01-04 11:09:01 -0800
commitc713d764c53e439352e79076eeecdbed9b2ccd6c (patch)
treeec2c6e1f7d912a03442405d8fa28cf23de9d889b /tools/check_radio_versions.py
parent12b55e8654520aac7cb466e7c149a11a48cc3b0e (diff)
downloadbuild-c713d764c53e439352e79076eeecdbed9b2ccd6c.zip
build-c713d764c53e439352e79076eeecdbed9b2ccd6c.tar.gz
build-c713d764c53e439352e79076eeecdbed9b2ccd6c.tar.bz2
py3: update all the things
Change-Id: I5e11b46b7c2f7f8760d6c0e713ca99c1e88b7cd3
Diffstat (limited to 'tools/check_radio_versions.py')
-rwxr-xr-xtools/check_radio_versions.py22
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/check_radio_versions.py b/tools/check_radio_versions.py
index ebe621f..2617424 100755
--- a/tools/check_radio_versions.py
+++ b/tools/check_radio_versions.py
@@ -14,8 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+from __future__ import print_function
+
import sys
-import os
try:
from hashlib import sha1
@@ -52,8 +53,9 @@ for item in sys.argv[2:]:
try:
f = open(fn + ".sha1")
except IOError:
- if not bad: print
- print "*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key)
+ if not bad:
+ print()
+ print("*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key))
bad = True
continue
for line in f:
@@ -63,17 +65,19 @@ for item in sys.argv[2:]:
versions[h] = v
if digest not in versions:
- if not bad: print
- print "*** SHA-1 hash of \"%s\" doesn't appear in \"%s.sha1\"" % (fn, fn)
+ if not bad:
+ print()
+ print("*** SHA-1 hash of \"%s\" doesn't appear in \"%s.sha1\"" % (fn, fn))
bad = True
continue
if versions[digest] not in values:
- if not bad: print
- print "*** \"%s\" is version %s; not any %s allowed by \"%s\"." % (
- fn, versions[digest], key, sys.argv[1])
+ if not bad:
+ print()
+ print("*** \"%s\" is version %s; not any %s allowed by \"%s\"." % (
+ fn, versions[digest], key, sys.argv[1]))
bad = True
if bad:
- print
+ print()
sys.exit(1)