summaryrefslogtreecommitdiffstats
path: root/tools/releasetools
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2011-08-11 16:55:00 -0700
committerYing Wang <wangying@google.com>2011-08-11 16:55:00 -0700
commit6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8 (patch)
tree6e0ca998a952e5e447b46d454f2b8b1843218115 /tools/releasetools
parentc55ebf232e1c0287ef841a5d917cb12feefba2d6 (diff)
parenta74a4811ae46e24f73b3078c9b7bfe3c4861d03e (diff)
downloadbuild-6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8.zip
build-6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8.tar.gz
build-6d38bdfc7b9ff699370b4a40dcbdddce0ea713b8.tar.bz2
resolved conflicts for merge of a74a4811 to honeycomb-plus-aosp
Change-Id: I8400ac2bead6aa1a9902d44bf65906084ad353ad
Diffstat (limited to 'tools/releasetools')
-rwxr-xr-xtools/releasetools/check_target_files_signatures5
-rw-r--r--tools/releasetools/common.py6
-rwxr-xr-xtools/releasetools/ota_from_target_files5
3 files changed, 12 insertions, 4 deletions
diff --git a/tools/releasetools/check_target_files_signatures b/tools/releasetools/check_target_files_signatures
index 2c97e2e..1325ef4 100755
--- a/tools/releasetools/check_target_files_signatures
+++ b/tools/releasetools/check_target_files_signatures
@@ -52,6 +52,11 @@ import subprocess
import tempfile
import zipfile
+try:
+ from hashlib import sha1 as sha1
+except ImportError:
+ from sha import sha as sha1
+
import common
# Work around a bug in python's zipfile module that prevents opening
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 40da73a..2cb5680 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -29,11 +29,9 @@ import time
import zipfile
try:
- import hashlib
- sha1 = hashlib.sha1
+ from hashlib import sha1 as sha1
except ImportError:
- import sha
- sha1 = sha.sha
+ from sha import sha as sha1
# missing in Python 2.4 and before
if not hasattr(os, "SEEK_SET"):
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 8f5c3fe..aead38f 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -63,6 +63,11 @@ import tempfile
import time
import zipfile
+try:
+ from hashlib import sha1 as sha1
+except ImportError:
+ from sha import sha as sha1
+
import common
import edify_generator