Try to fix nativecode issues on index

This commit is contained in:
Daniel Martí 2013-07-19 11:47:35 +02:00
parent c395e3ae68
commit de7b117c98

View file

@ -295,7 +295,9 @@ def scan_apks(apps, apkcache, repodir, knownapks):
elif line.startswith("sdkVersion:"): elif line.startswith("sdkVersion:"):
thisinfo['sdkversion'] = re.match(sdkversion_pat, line).group(1) thisinfo['sdkversion'] = re.match(sdkversion_pat, line).group(1)
elif line.startswith("native-code:"): elif line.startswith("native-code:"):
thisinfo['nativecode'] = list(line[14:-1].split("' '")) thisinfo['nativecode'] = line[14:-1]
if "' '" in thisinfo['nativecode']:
thisinfo['nativecode'] = thisinfo['nativecode'].replace("' '", ",")
elif line.startswith("uses-permission:"): elif line.startswith("uses-permission:"):
perm = re.match(string_pat, line).group(1) perm = re.match(string_pat, line).group(1)
if perm.startswith("android.permission."): if perm.startswith("android.permission."):
@ -534,8 +536,8 @@ def make_index(apps, apks, repodir, archive, categories):
perms = "" perms = ""
if len(apk['permissions']) > 0: if len(apk['permissions']) > 0:
addElement('permissions', ','.join(apk['permissions']), doc, apkel) addElement('permissions', ','.join(apk['permissions']), doc, apkel)
if 'nativecode' in apk and len(apk['nativecode']) > 0: if 'nativecode' in apk:
addElement('nativecode', ','.join(apk['nativecode']), doc, apkel) addElement('nativecode', apk['nativecode'], doc, apkel)
if len(apk['features']) > 0: if len(apk['features']) > 0:
addElement('features', ','.join(apk['features']), doc, apkel) addElement('features', ','.join(apk['features']), doc, apkel)