Skip to content
Snippets Groups Projects
Commit 0af0ec5c authored by Eric Kunze's avatar Eric Kunze Committed by Eric Kunze
Browse files

Switched yaml-loader from oyaml to pythonordereddictloader

New loader is installable via apt instead of pip
parent 59f31697
Branches
Tags
No related merge requests found
FROM docker.imp.fu-berlin.de:5000/pub/python-flask
RUN apt-get update \
&& apt-get install -y python3-pip \
&& pip3 install oyaml
&& apt-get install -y python3-yamlordereddictloader
EXPOSE 5000
......
#!/usr/bin/python3
from flask import Flask, render_template, request, abort
import oyaml as yaml
import yaml
import yamlordereddictloader as yamlODL
import json
from collections import OrderedDict
......@@ -21,7 +22,7 @@ def loadyaml(filename):
file = open(filepath + filename, "r")
yamldata = file.read()
global DATA
DATA = yaml.load(yamldata)
DATA = yaml.load(yamldata, Loader=yamlODL.Loader)
file.close()
#Json
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment