mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
do not crash if no versionCode is found while parsing
if vercode is None and max_vercode is None, then it gave None as an arg to the regexp pattern in ignoresearch(). closes #261
This commit is contained in:
parent
d92ac1e8f6
commit
507ed4a170
1 changed files with 3 additions and 3 deletions
|
|
@ -1160,12 +1160,11 @@ def parse_androidmanifests(paths, app):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
logging.debug("Parsing manifest at {0}".format(path))
|
logging.debug("Parsing manifest at {0}".format(path))
|
||||||
gradle = has_extension(path, 'gradle')
|
|
||||||
version = None
|
version = None
|
||||||
vercode = None
|
vercode = None
|
||||||
package = None
|
package = None
|
||||||
|
|
||||||
if gradle:
|
if has_extension(path, 'gradle'):
|
||||||
with open(path, 'r') as f:
|
with open(path, 'r') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if gradle_comment.match(line):
|
if gradle_comment.match(line):
|
||||||
|
|
@ -1218,7 +1217,8 @@ def parse_androidmanifests(paths, app):
|
||||||
if max_version is None and version is not None:
|
if max_version is None and version is not None:
|
||||||
max_version = version
|
max_version = version
|
||||||
|
|
||||||
if max_vercode is None or (vercode is not None and vercode > max_vercode):
|
if vercode is not None \
|
||||||
|
and (max_vercode is None or vercode > max_vercode):
|
||||||
if not ignoresearch or not ignoresearch(version):
|
if not ignoresearch or not ignoresearch(version):
|
||||||
if version is not None:
|
if version is not None:
|
||||||
max_version = version
|
max_version = version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue