Use load_mmd_file instead of load_mmd where possible

This commit is contained in:
mprahl
2019-04-24 09:37:42 -04:00
parent d3b8b11b48
commit 6c8d48280d
2 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ from module_build_service import models
from module_build_service.utils import (
submit_module_build_from_yaml,
load_local_builds,
load_mmd,
load_mmd_file,
import_mmd,
import_builds_from_local_dnf_repos,
)
@@ -104,7 +104,7 @@ def cleardb():
def import_module(mmd_file):
""" Imports the module from mmd_file
"""
mmd = load_mmd(mmd_file, is_file=True)
mmd = load_mmd_file(mmd_file)
import_mmd(db.session, mmd)

View File

@@ -875,7 +875,7 @@ def _fetch_mmd(url, branch=None, allow_local_url=False, whitelist_url=False, man
if not whitelist_url and mandatory_checks:
scm.verify()
cofn = scm.get_module_yaml()
mmd = load_mmd(cofn, is_file=True)
mmd = load_mmd_file(cofn)
finally:
try:
if td is not None:
@@ -1021,7 +1021,7 @@ def load_local_builds(local_build_nsvs, session=None):
# Load the modulemd metadata.
path = os.path.join(conf.mock_resultsdir, found_build[3], "results")
mmd = load_mmd(os.path.join(path, "modules.yaml"), is_file=True)
mmd = load_mmd_file(os.path.join(path, "modules.yaml"))
# Create ModuleBuild in database.
module = models.ModuleBuild.create(