Skip to content

Commit

Permalink
Use yaml.dump to render yaml for downtime form
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci committed Oct 30, 2018
1 parent dc715ed commit b989461
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/webapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b989461

Please sign in to comment.