1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

list_builder: gotta load manifest.toml, not json, for app v2

This commit is contained in:
Alexandre Aubin 2022-08-04 17:14:42 +02:00
parent 54a8e45d31
commit 0341bcdf8f

View file

@ -5,10 +5,12 @@ import sys
import os import os
import re import re
import json import json
import toml
import subprocess import subprocess
import yaml import yaml
import time import time
from collections import OrderedDict
from tools.packaging_v2.convert_v1_manifest_to_v2_for_catalog import convert_v1_manifest_to_v2_for_catalog from tools.packaging_v2.convert_v1_manifest_to_v2_for_catalog import convert_v1_manifest_to_v2_for_catalog
now = time.time() now = time.time()
@ -297,7 +299,11 @@ def build_app_dict(app, infos):
timestamp = int(timestamp) timestamp = int(timestamp)
# Build the dict with all the infos # Build the dict with all the infos
if os.path.exists(open(this_app_cache + "/manifest.toml")):
manifest = toml.load(open(this_app_cache + "/manifest.toml", _dict=OrderedDict))
else:
manifest = json.load(open(this_app_cache + "/manifest.json")) manifest = json.load(open(this_app_cache + "/manifest.json"))
return { return {
"id": manifest["id"], "id": manifest["id"],
"git": { "git": {