#220 Make osbs optional
Merged 5 years ago by lsedlar. Opened 6 years ago by cqi.

file modified
+9 -2
@@ -27,8 +27,6 @@ 

  import tempfile

  import koji.ssl.SSLCommon

  

- from osbs.api import OSBS

- from osbs.conf import Configuration

  from six.moves import configparser

  from six.moves import urllib

  
@@ -2488,6 +2486,15 @@ 

  

      def osbs_build(self, config_file, config_section, target_override=False,

                     yum_repourls=[], nowait=False):

+         # Because docker image should be built via Koji not in OSBS directly,

+         # it is not necessary to make osbs as a hard dependency

+         try:

+             from osbs.api import OSBS

+             from osbs.conf import Configuration

+         except ImportError:

+             raise rpkgError('Before building docker image in OSBS directly, '

+                             'please install python-osbs-client in advance.')

+ 

          self.check_repo()

          os_conf = Configuration(conf_file=config_file, conf_section=config_section)

          build_conf = Configuration(conf_file=config_file, conf_section=config_section)

no initial comment

Pull-Request has been merged by cqi

6 years ago

Commit 161cd10 fixes this pull-request

Pull-Request has been merged by lsedlar

5 years ago
Metadata