#426 Container-build returns its status to command-line
Merged 3 years ago by onosek. Opened 3 years ago by onosek.

file modified
+3
@@ -3011,6 +3011,7 @@ 

          else:

              koji_session_backup = (self.build_client, self.kojiprofile)

  

+         rv = 0  # return value of koji task. It is returned as a method result.

          try:

              self.load_kojisession()

              if "buildContainer" not in self.kojisession.system.listMethods():
@@ -3073,6 +3074,8 @@ 

                  self.build_client, self.kojiprofile = koji_session_backup

              self.load_kojisession()

  

+         return rv

+ 

      def container_build_setup(self, get_autorebuild=None,

                                set_autorebuild=None):

          cfp = ConfigParser()

file modified
+2 -1
@@ -1868,7 +1868,7 @@ 

          if flatpak:

              self.set_module_api_url()

  

-         self.cmd.container_build_koji(

+         rv = self.cmd.container_build_koji(

              target_override,

              opts=opts,

              kojiconfig=kojiconfig,
@@ -1877,6 +1877,7 @@ 

              koji_task_watcher=koji_cli.lib.watch_tasks,

              nowait=self.args.nowait,

              flatpak=flatpak)

+         return rv

  

      def flatpak_build(self):

          self.container_build(flatpak=True)

Fixes: #415

Signed-off-by: Ondrej Nosek onosek@redhat.com

Pull-Request has been merged by onosek

3 years ago