mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-01 18:01:40 +08:00
Use load_mmd_file instead of load_mmd where possible
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user