Make finalization before changing state to done

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
This commit is contained in:
Valerij Maljulin
2019-01-29 15:56:58 +01:00
parent 89ccef5e42
commit eafa93037f
5 changed files with 43 additions and 16 deletions

View File

@@ -1205,8 +1205,9 @@ chmod 644 %buildroot/etc/rpm/macros.zz-modules
return list(nvrs)
def finalize(self):
# Only import to koji CG if the module is "done".
if self.config.koji_enable_content_generator and self.module.state == 3:
# Only import to koji CG if the module is "build".
if self.config.koji_enable_content_generator and \
self.module.state == models.BUILD_STATES['build']:
cg = KojiContentGenerator(self.module, self.config)
cg.koji_import()
if conf.koji_cg_devel_module: