From 61d7f86ea15ede1c1861972ed28c45a9cf118c4f Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sun, 7 Mar 2021 17:47:56 +0100 Subject: [PATCH] possibile fix errore in get_all_settings_addon --- platformcode/config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platformcode/config.py b/platformcode/config.py index e8da5893..d6f7753d 100644 --- a/platformcode/config.py +++ b/platformcode/config.py @@ -170,13 +170,13 @@ def enable_disable_autorun(is_enabled): set_setting('autostart', True) return True + def get_all_settings_addon(): # Read the settings.xml file and return a dictionary with {id: value} from core import scrapertools - infile = open(os.path.join(get_data_path(), "settings.xml"), "r") - data = infile.read() - infile.close() + with open(os.path.join(get_data_path(), "settings.xml"), "rb") as infile: + data = infile.read().decode('utf-8') ret = {} matches = scrapertools.find_multiple_matches(data, ']*>([^<]*)')