| |
@@ -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)
|
| |