From b989461ed3b2f9401ccea4b80a0cf9d3a3cd79c5 Mon Sep 17 00:00:00 2001 From: Matyas Selmeci Date: Mon, 29 Oct 2018 15:27:11 -0500 Subject: [PATCH] Use yaml.dump to render yaml for downtime form --- src/webapp/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webapp/models.py b/src/webapp/models.py index ff54fff92..b0de4a43a 100644 --- a/src/webapp/models.py +++ b/src/webapp/models.py @@ -4,7 +4,7 @@ import time from typing import Dict, Set, List -import anymarkup +import yaml from webapp import common, contacts_reader, project_reader, rg_reader, vo_reader from webapp.contacts_reader import ContactsData @@ -166,7 +166,7 @@ def get_downtime_yaml(start_datetime: datetime.datetime, """ def render(key, value): - return anymarkup.serialize({key: value}, "yaml").decode("utf-8", errors="replace").strip() + return yaml.dump({key: value}, default_flow_style=False).strip() def indent(in_str, amount): spaces = ' ' * amount