summaryrefslogtreecommitdiffstats
path: root/tools/releasetools/make_recovery_patch
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-03-23 19:13:21 -0700
committerDan Albert <danalbert@google.com>2015-03-24 11:05:16 -0700
commit8b72aefb5a8ed4da28c6f83854e8babf53b9cb53 (patch)
tree4f8b55ebd80041d644aaf411adaf8c34696749c5 /tools/releasetools/make_recovery_patch
parent5d60719e42fdc0d007920d946f1c1bb440cedab7 (diff)
downloadbuild-8b72aefb5a8ed4da28c6f83854e8babf53b9cb53.zip
build-8b72aefb5a8ed4da28c6f83854e8babf53b9cb53.tar.gz
build-8b72aefb5a8ed4da28c6f83854e8babf53b9cb53.tar.bz2
Make releasetools pylint clean.
This caught a few bugs/syntax errors (a few character classes were not escaped properly in regex patterns, some indentation was illegal, etc). Change-Id: I50637607524e68c4fb9cad7167f58a46b8d26b2c
Diffstat (limited to 'tools/releasetools/make_recovery_patch')
l---------[-rwxr-xr-x]tools/releasetools/make_recovery_patch54
1 files changed, 1 insertions, 53 deletions
diff --git a/tools/releasetools/make_recovery_patch b/tools/releasetools/make_recovery_patch
index 08d1450..45cec08 100755..120000
--- a/tools/releasetools/make_recovery_patch
+++ b/tools/releasetools/make_recovery_patch
@@ -1,53 +1 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2014 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-import sys
-
-if sys.hexversion < 0x02070000:
- print >> sys.stderr, "Python 2.7 or newer is required."
- sys.exit(1)
-
-import os
-import common
-
-OPTIONS = common.OPTIONS
-
-def main(argv):
- # def option_handler(o, a):
- # return False
-
- args = common.ParseOptions(argv, __doc__)
- input_dir, output_dir = args
-
- OPTIONS.info_dict = common.LoadInfoDict(input_dir)
-
- recovery_img = common.GetBootableImage("recovery.img", "recovery.img",
- input_dir, "RECOVERY")
- boot_img = common.GetBootableImage("boot.img", "boot.img",
- input_dir, "BOOT")
-
- if not recovery_img or not boot_img:
- sys.exit(0)
-
- def output_sink(fn, data):
- with open(os.path.join(output_dir, "SYSTEM", *fn.split("/")), "wb") as f:
- f.write(data)
-
- common.MakeRecoveryPatch(input_dir, output_sink, recovery_img, boot_img)
-
-
-if __name__ == '__main__':
- main(sys.argv[1:])
+make_recovery_patch.py \ No newline at end of file