Skip to content

Commit 40c50a9

Browse files
authored
Merge pull request #35 from fosslight/platform_version_check
Fix the platform version as an integer
2 parents 47b1a0b + 10200f8 commit 40c50a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/fosslight_android/android_binary_analysis.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,15 @@ def set_env_variables_from_result_log():
202202
# Check the platform version
203203
for line in android_log_lines:
204204
try:
205-
line = line.strip()
206-
pattern = re.compile(r'.*PLATFORM_VERSION\s*=\s*(\d+.?\d?)(.*\d*)\S*\s*')
205+
line = line.strip()
206+
pattern = re.compile(r'.*PLATFORM_VERSION\s*=\s*(\d+)\.?\d*\S*\s*')
207207
matched = pattern.match(line)
208208
if matched is not None:
209209
platform_version = matched.group(1)
210210
break
211211

212212
except Exception:
213-
pass
213+
pass
214214

215215
# FIND a NOTICE file and build out path
216216
for line in reversed(android_log_lines):

0 commit comments

Comments
 (0)