mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02:00
Reduce try/except block
This commit is contained in:
parent
1151ba298f
commit
7e1d974351
@ -1846,6 +1846,9 @@ def parse_androidmanifests(paths, app):
|
||||
else:
|
||||
try:
|
||||
xml = parse_xml(path)
|
||||
except Exception:
|
||||
logging.warning(_("Problem with xml at '{path}'").format(path=path))
|
||||
continue
|
||||
if "package" in xml.attrib:
|
||||
s = xml.attrib["package"]
|
||||
if app_matches_packagename(app, s):
|
||||
@ -1858,8 +1861,6 @@ def parse_androidmanifests(paths, app):
|
||||
a = xml.attrib[XMLNS_ANDROID + "versionCode"]
|
||||
if string_is_integer(a):
|
||||
vercode = a
|
||||
except Exception:
|
||||
logging.warning(_("Problem with xml at '{path}'").format(path=path))
|
||||
|
||||
# Remember package name, may be defined separately from version+vercode
|
||||
if package is None:
|
||||
|
Loading…
Reference in New Issue
Block a user