mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Replace finds with pythonic terms
This commit is contained in:
parent
8f3a2d4355
commit
efc8317272
3 changed files with 8 additions and 10 deletions
|
|
@ -341,11 +341,10 @@ def parse_srclib(metafile, **kw):
|
|||
if not line or line.startswith("#"):
|
||||
continue
|
||||
|
||||
index = line.find(':')
|
||||
if index == -1:
|
||||
try:
|
||||
field, value = line.split(':',1)
|
||||
except ValueError:
|
||||
raise MetaDataException("Invalid metadata in " + metafile.name + " at: " + line)
|
||||
field = line[:index]
|
||||
value = line[index+1:]
|
||||
|
||||
if field == "Subdir":
|
||||
thisinfo[field] = value.split(',')
|
||||
|
|
@ -543,11 +542,10 @@ def parse_metadata(metafile):
|
|||
if line.startswith("#"):
|
||||
curcomments.append(line)
|
||||
continue
|
||||
index = line.find(':')
|
||||
if index == -1:
|
||||
try:
|
||||
field, value = line.split(':',1)
|
||||
except ValueError:
|
||||
raise MetaDataException("Invalid metadata in " + metafile.name + " at: " + line)
|
||||
field = line[:index]
|
||||
value = line[index+1:]
|
||||
|
||||
# Translate obsolete fields...
|
||||
if field == 'Market Version':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue