mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-05 06:50:10 +01:00
metadata: Remove ununsed code
This commit is contained in:
parent
82c3e364a5
commit
cff57e1a53
@ -607,33 +607,11 @@ def read_metadata(appids={}, sort_by_time=False):
|
|||||||
return apps
|
return apps
|
||||||
|
|
||||||
|
|
||||||
# Port legacy ';' separators
|
|
||||||
list_sep = re.compile(r'[,;]')
|
|
||||||
|
|
||||||
|
|
||||||
def split_list_values(s):
|
|
||||||
res = []
|
|
||||||
for v in re.split(list_sep, s):
|
|
||||||
if not v:
|
|
||||||
continue
|
|
||||||
v = v.strip()
|
|
||||||
if not v:
|
|
||||||
continue
|
|
||||||
res.append(v)
|
|
||||||
return res
|
|
||||||
|
|
||||||
|
|
||||||
def sorted_builds(builds):
|
def sorted_builds(builds):
|
||||||
return sorted(builds, key=lambda build: build.versionCode)
|
return sorted(builds, key=lambda build: build.versionCode)
|
||||||
|
|
||||||
|
|
||||||
esc_newlines = re.compile(r'\\( |\n)')
|
|
||||||
|
|
||||||
|
|
||||||
def post_metadata_parse(app):
|
def post_metadata_parse(app):
|
||||||
if 'flavours' in app and app['flavours'] == [True]:
|
|
||||||
app['flavours'] = 'yes'
|
|
||||||
|
|
||||||
for k, v in app.items():
|
for k, v in app.items():
|
||||||
if fieldtype(k) == TYPE_LIST:
|
if fieldtype(k) == TYPE_LIST:
|
||||||
if isinstance(v, str):
|
if isinstance(v, str):
|
||||||
@ -723,18 +701,6 @@ def post_metadata_parse(app):
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
bool_true = re.compile(r'([Yy]es|[Tt]rue)')
|
|
||||||
bool_false = re.compile(r'([Nn]o|[Ff]alse)')
|
|
||||||
|
|
||||||
|
|
||||||
def _decode_bool(s):
|
|
||||||
if bool_true.match(s):
|
|
||||||
return True
|
|
||||||
if bool_false.match(s):
|
|
||||||
return False
|
|
||||||
_warn_or_exception(_("Invalid boolean '%s'") % s)
|
|
||||||
|
|
||||||
|
|
||||||
def parse_metadata(metadatapath):
|
def parse_metadata(metadatapath):
|
||||||
"""Parse metadata file, also checking the source repo for .fdroid.yml.
|
"""Parse metadata file, also checking the source repo for .fdroid.yml.
|
||||||
|
|
||||||
@ -997,10 +963,6 @@ def write_yaml(mf, app):
|
|||||||
ruamel.yaml.round_trip_dump(yaml_app, mf, indent=4, block_seq_indent=2)
|
ruamel.yaml.round_trip_dump(yaml_app, mf, indent=4, block_seq_indent=2)
|
||||||
|
|
||||||
|
|
||||||
build_line_sep = re.compile(r'(?<!\\),')
|
|
||||||
build_cont = re.compile(r'^[ \t]')
|
|
||||||
|
|
||||||
|
|
||||||
def write_metadata(metadatapath, app):
|
def write_metadata(metadatapath, app):
|
||||||
metadatapath = Path(metadatapath)
|
metadatapath = Path(metadatapath)
|
||||||
if metadatapath.suffix == '.yml':
|
if metadatapath.suffix == '.yml':
|
||||||
|
Loading…
Reference in New Issue
Block a user