diff options
author | Dan Albert <danalbert@google.com> | 2015-03-28 02:38:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-03-28 02:38:22 +0000 |
commit | 3d4466f3d6abe00a210c8f14ba5daff68533a233 (patch) | |
tree | 70b75f5fdd0ce6694e10987d2e9a15b2782bd67f /tools/releasetools/common.py | |
parent | f9aa358b4b7c057b083206a824a15be13baa5a67 (diff) | |
parent | 146366bfb28e6f7c7b785188325fab40c4db000a (diff) | |
download | build-3d4466f3d6abe00a210c8f14ba5daff68533a233.zip build-3d4466f3d6abe00a210c8f14ba5daff68533a233.tar.gz build-3d4466f3d6abe00a210c8f14ba5daff68533a233.tar.bz2 |
am 146366bf: am b6339d74: am f1a8c8c5: Merge "Fix up a few callers of GetTypeAndDevice."
* commit '146366bfb28e6f7c7b785188325fab40c4db000a':
Fix up a few callers of GetTypeAndDevice.
Diffstat (limited to 'tools/releasetools/common.py')
-rw-r--r-- | tools/releasetools/common.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 9e5e70c..1fd9f76 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -1258,14 +1258,11 @@ def MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img, _, _, patch = d.ComputePatch() output_sink("recovery-from-boot.p", patch) - td_pair = GetTypeAndDevice("/boot", info_dict) - if not td_pair: - return - boot_type, boot_device = td_pair - td_pair = GetTypeAndDevice("/recovery", info_dict) - if not td_pair: + try: + boot_type, boot_device = GetTypeAndDevice("/boot", info_dict) + recovery_type, recovery_device = GetTypeAndDevice("/recovery", info_dict) + except KeyError: return - recovery_type, recovery_device = td_pair sh = """#!/system/bin/sh if ! applypatch -c %(recovery_type)s:%(recovery_device)s:%(recovery_size)d:%(recovery_sha1)s; then |