Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions _update-metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
import sys
import collections

# from ruamel.yaml import YAML
import ruamel.yaml as YAML

from ruamel.yaml import YAML

Command = collections.namedtuple('Command', ['charm', 'cmd', 'params'])

Expand Down Expand Up @@ -80,12 +78,14 @@ def metadata_file(cmd):

def load_yaml(cmd):
with open(metadata_file(cmd)) as f:
return YAML.load(f, YAML.RoundTripLoader)
yaml = YAML(typ='rt')
return yaml.load(f)


def write_yaml(cmd, yml):
with open(metadata_file(cmd), "w") as f:
YAML.dump(yml, f, Dumper=YAML.RoundTripDumper)
yaml = YAML(typ='rt')
yaml.dump(yml, f)


def list_series(yml):
Expand Down