From a10c62a4fb7a00b1467b3b3e7b2db6a60ac98885 Mon Sep 17 00:00:00 2001 From: Jeongik Cha Date: Tue, 6 Aug 2019 11:32:05 +0900 Subject: [PATCH] cast Path to string type os.path.isdir, os.path.exists cannot handle Path type until python 3.5 so cat Path to string type Bug: 138639389 Test: development/vndk/tools/image-diff-tool/compare_images_and_print.sh "-t path1 path2 -s SYSTEM -i" Change-Id: I147eac6f2548558737409a7a93ac54f0053a072e --- vndk/tools/image-diff-tool/diff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vndk/tools/image-diff-tool/diff.py b/vndk/tools/image-diff-tool/diff.py index 4f9f6fe3f..ecc0ba083 100644 --- a/vndk/tools/image-diff-tool/diff.py +++ b/vndk/tools/image-diff-tool/diff.py @@ -69,7 +69,7 @@ def main(all_targets, search_paths, ignore_signing_key=False): if os.path.join(target, s).lower() + os.path.sep in p.lower(): return True return False - paths = [path for path in Path(target).glob('**/*') if valid_path(path)] + paths = [str(path) for path in Path(target).glob('**/*') if valid_path(str(path))] def run(path): is_native_component = silent_call(["objdump", "-a", path])