From 6c8d48280da9f8e3ce7b17c0dd7e3097accce2b2 Mon Sep 17 00:00:00 2001 From: mprahl Date: Apr 26 2019 12:00:54 +0000 Subject: Use load_mmd_file instead of load_mmd where possible --- diff --git a/module_build_service/manage.py b/module_build_service/manage.py index 201fc57..c0c1371 100755 --- a/module_build_service/manage.py +++ b/module_build_service/manage.py @@ -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) diff --git a/module_build_service/utils/submit.py b/module_build_service/utils/submit.py index 79bec14..ebcc464 100644 --- a/module_build_service/utils/submit.py +++ b/module_build_service/utils/submit.py @@ -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(