Browse Source

python3 support

pull/259/head
Juan Pablo Giménez 5 years ago
parent
commit
33626e221e
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      modules/addon/endpoints.py
  2. +1
    -1
      modules/system/endpoints.py

+ 2
- 2
modules/addon/endpoints.py View File

@@ -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))



+ 1
- 1
modules/system/endpoints.py View File

@@ -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')


Loading…
Cancel
Save