From 33626e221ec1acbcf21366829d5cbac82e57dd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Gim=C3=A9nez?= Date: Mon, 3 Aug 2020 23:50:02 -0300 Subject: [PATCH] python3 support --- modules/addon/endpoints.py | 4 ++-- modules/system/endpoints.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/addon/endpoints.py b/modules/addon/endpoints.py index 44c8066..10049fe 100644 --- a/modules/addon/endpoints.py +++ b/modules/addon/endpoints.py @@ -133,8 +133,8 @@ def plugins(): Read the central plugin yaml to get a list of all official plugins :return: """ - response = requests.get("https://raw.githubusercontent.com/Manuel83/craftbeerpi-plugins/master/plugins.yaml") - cbpi.cache["plugins"] = merge(yaml.load(response.text), cbpi.cache["plugins"]) + response = requests.get("https://raw.githubusercontent.com/jpgimenez/craftbeerpi-plugins/master/plugins.yaml") + cbpi.cache["plugins"] = merge(yaml.safe_load(response.text), cbpi.cache["plugins"]) for key, value in cbpi.cache["plugins"].items(): value["installed"] = os.path.isdir("./modules/plugins/%s/" % (key)) diff --git a/modules/system/endpoints.py b/modules/system/endpoints.py index 1cca9d0..31f90ef 100755 --- a/modules/system/endpoints.py +++ b/modules/system/endpoints.py @@ -130,8 +130,8 @@ class SystemView(FlaskView): endpoints[rule.rule][m] = dict(summary="", description="", consumes=["application/json"],produces=["application/json"]) with open("config/version.yaml", 'r') as stream: + y = yaml.safe_load(stream) - y = yaml.load(stream) pprint.pprint(y) pprint.pprint(re) return Response(yaml.dump(re), mimetype='text/yaml')