From f8dfe532e66976b7d018d48095b83da79e711ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Wed, 15 May 2013 14:33:14 +0200 Subject: [PATCH] Properly match app_version or version --- fdroidserver/common.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index bc3532b4..e9982c39 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -842,7 +842,7 @@ def parse_androidmanifest(app_dir): vcsearch = re.compile(r'.*android:versionCode="([0-9]+)".*').search vnsearch = re.compile(r'.*android:versionName="([^@]+)".*').search psearch = re.compile(r'.*package="([^"]+)".*').search - vnsearch_xml = re.compile(r'.*"[a-z_]*version">([^<]+)<.*').search + vnsearch_xml = re.compile(r'.*"(app_|)version">([^<]+)<.*').search version = None vercode = None package = None @@ -866,13 +866,13 @@ def parse_androidmanifest(app_dir): if not version: matches = vnsearch_xml(line) if matches: - version = matches.group(1) + version = matches.group(2) if not version: for line in file(app_dir + '/res/values/strings.xml'): if not version: matches = vnsearch_xml(line) if matches: - version = matches.group(1) + version = matches.group(2) if not version: version = "None" return (version, vercode, package)