mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
metadata: parsed srclibs must always return a dict as the container
This commit is contained in:
parent
410901d3bd
commit
a0e3b01e94
2 changed files with 16 additions and 0 deletions
|
|
@ -763,6 +763,9 @@ def parse_yaml_srclib(metadatapath):
|
|||
with open(metadatapath, "r", encoding="utf-8") as f:
|
||||
try:
|
||||
data = yaml.load(f, Loader=SafeLoader)
|
||||
if type(data) is not dict:
|
||||
raise yaml.error.YAMLError(_('{file} is blank or corrupt!')
|
||||
.format(file=metadatapath))
|
||||
except yaml.error.YAMLError as e:
|
||||
warn_or_exception(_("Invalid srclib metadata: could not "
|
||||
"parse '{file}'")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue