Merge "Skip non-zip files when refreshing build library" am: 2d4909a1cb am: 985259187a am: 0a3522a60e

Original change: https://android-review.googlesource.com/c/platform/development/+/1811897

Change-Id: I5445301adc369157eb3f5f614c8b4420ae2febfa
This commit is contained in:
Kelvin Zhang
2021-09-01 01:06:23 +00:00
committed by Automerger Merge Worker

View File

@@ -130,8 +130,9 @@ class TargetLib:
if os.path.isdir(path):
builds_name = os.listdir(path)
for build_name in builds_name:
if build_name.endswith(".zip"):
self.new_build(build_name, os.path.join(path, build_name))
elif os.path.isfile(path):
elif os.path.isfile(path) and path.endswith(".zip"):
self.new_build(os.path.split(path)[-1], path)
return self.get_builds()