Add simple liaisons wrapper module
I'm going to want to use this in a later change so lets make the abstraction now Change-Id: I0d15b5137d857bffb2bed39e995e50fed24f5598
This commit is contained in:
parent
7045ff71b0
commit
390883c17d
@ -29,7 +29,6 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import yaml
|
||||
|
||||
from openstack_governance import governance
|
||||
import pyfiglet
|
||||
@ -39,6 +38,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
|
||||
|
||||
@ -260,8 +260,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.
|
||||
|
23
openstack_releases/liaisons.py
Normal file
23
openstack_releases/liaisons.py
Normal 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
|
Loading…
Reference in New Issue
Block a user