#1069 Remove unused variable local_modules from format_mmd
Merged 5 months ago by mprahl. Opened 5 months ago by cqi.
cqi/fm-orchestrator remove-unused-code  into  master

@@ -112,7 +112,7 @@ 

      }

  

  

- def format_mmd(mmd, scmurl, session=None):

+ def format_mmd(mmd, scmurl):

      """

      Prepares the modulemd for the MBS. This does things such as replacing the

      branches of components with commit hashes and adding metadata in the xmd

@@ -124,9 +124,6 @@ 

      # them because of dep-chain.

      from module_build_service.scm import SCM

  

-     if not session:

-         session = db.session

- 

      xmd = glib.from_variant_dict(mmd.get_xmd())

      if 'mbs' not in xmd:

          xmd['mbs'] = {}

@@ -135,9 +132,6 @@ 

      if 'commit' not in xmd['mbs']:

          xmd['mbs']['commit'] = ''

  

-     local_modules = models.ModuleBuild.local_modules(session)

-     local_modules = {m.name + "-" + m.stream: m for m in local_modules}

- 

      # If module build was submitted via yaml file, there is no scmurl

      if scmurl:

          scm = SCM(scmurl)

@@ -300,7 +294,7 @@ 

  

      # Format the modulemd by putting in defaults and replacing streams that

      # are branches with commit hashes

-     format_mmd(mmd, module.scmurl, session=session)

+     format_mmd(mmd, module.scmurl)

  

      # When main_mmd is set, merge the metadata from this mmd to main_mmd,

      # otherwise our current mmd is main_mmd.

LGTM, not sure what's up with the Jenkins job failure.

Commit 8356848 fixes this pull-request

Pull-Request has been merged by mprahl

5 months ago

Pull-Request has been merged by mprahl

5 months ago