#71 return buildinfo from cg_import
Merged 7 years ago by mikem. Opened 8 years ago by mikem.
https://github.com/mikem23/koji-playground.git cg-return  into  master

honor --test in import-cg command
Mike McLean • 8 years ago  
return buildinfo from cg_import
Mike McLean • 8 years ago  
cli/koji
file modified
+3
@@ -1622,6 +1622,9 @@

              parser.error(_("No such file: %s") % localpath)

          to_upload.append([localpath, info])

  

+     if options.test:

+         return

+ 

      # get upload path

      # XXX - need a better way

      serverdir = _unique_path('cli-import')

hub/kojihub.py
file modified
+3 -1
@@ -4697,7 +4697,7 @@

      """

  

      importer = CG_Importer()

-     importer.do_import(metadata, directory)

+     return importer.do_import(metadata, directory)

  

  

  class CG_Importer(object):
@@ -4738,6 +4738,8 @@

          koji.plugin.run_callbacks('postImport', type='cg', metadata=metadata,

                      directory=directory, buildinfo=self.buildinfo)

  

+         return self.buildinfo

+ 

  

      def get_metadata(self, metadata, directory):

          """Get the metadata from the args"""

no initial comment

also includes a fix to honor --test option in the cli command

Pull-Request has been merged by mikem

7 years ago
Metadata