From e62bd2b2e7dbb88d0b6be41026303b24796c016e Mon Sep 17 00:00:00 2001 From: Inex Code Date: Sat, 21 Dec 2024 21:11:43 +0300 Subject: [PATCH] fix: Didn't parse JSON --- selfprivacy_api/services/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/selfprivacy_api/services/__init__.py b/selfprivacy_api/services/__init__.py index 09e0ce7..5a14d51 100644 --- a/selfprivacy_api/services/__init__.py +++ b/selfprivacy_api/services/__init__.py @@ -4,6 +4,7 @@ import logging import base64 import typing import subprocess +import json from typing import List from os import path, remove from os import makedirs @@ -305,7 +306,7 @@ def get_services() -> List[Service]: if path.exists(SP_SUGGESTED_MODULES_PATH): # It is a file with a JSON array with open(SP_SUGGESTED_MODULES_PATH) as f: - suggested_modules = f.read().splitlines() + suggested_modules = json.load(f) for module in suggested_modules: if module in service_ids: continue