Merge "Add simple liaisons wrapper module"

This commit is contained in:
Zuul 2020-01-09 18:41:53 +00:00 committed by Gerrit Code Review
commit 47ebe622b1
2 changed files with 25 additions and 3 deletions

View File

@ -27,7 +27,6 @@ import shutil
import subprocess
import sys
import tempfile
import yaml
from openstack_governance import governance
import pyfiglet
@ -37,6 +36,7 @@ from openstack_releases import defaults
from openstack_releases import deliverable
from openstack_releases import gitutils
from openstack_releases import hound
from openstack_releases import liaisons
from openstack_releases import release_notes
from openstack_releases import yamlutils
@ -258,8 +258,7 @@ def main():
False,
)
with open("./data/release_liaisons.yaml", "r") as f:
liaison_data = yaml.safe_load(f)
liaison_data = liaisons.get_liaisons()
# Remove any inherited PAGER environment variable to avoid
# blocking the output waiting for input.

View File

@ -0,0 +1,23 @@
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""Simple wrapper(s) around liaison data"""
import yaml
def get_liaisons():
with open("./data/release_liaisons.yaml", "r") as f:
liaison_data = yaml.safe_load(f)
return liaison_data