mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Merge #318 Handle changing PDCClient API.
This commit is contained in:
@@ -28,12 +28,12 @@
|
||||
import modulemd
|
||||
from pdc_client import PDCClient
|
||||
|
||||
import inspect
|
||||
import pprint
|
||||
import logging
|
||||
log = logging.getLogger()
|
||||
|
||||
import six
|
||||
import module_build_service
|
||||
|
||||
|
||||
def get_pdc_client_session(config):
|
||||
@@ -41,7 +41,20 @@ def get_pdc_client_session(config):
|
||||
:param config: instance of module_build_service.config.Config
|
||||
:return pdc_client.PDCClient instance
|
||||
"""
|
||||
return PDCClient(config.pdc_url, config.pdc_develop, config.pdc_insecure) # hardcoded devel env
|
||||
if 'ssl_verify' in inspect.getargspec(PDCClient.__init__).args:
|
||||
# New API
|
||||
return PDCClient(
|
||||
server=config.pdc_url,
|
||||
develop=config.pdc_develop,
|
||||
ssl_verify=not config.pdc_insecure,
|
||||
)
|
||||
else:
|
||||
# Old API
|
||||
return PDCClient(
|
||||
server=config.pdc_url,
|
||||
develop=config.pdc_develop,
|
||||
insecure=config.pdc_insecure,
|
||||
)
|
||||
|
||||
def get_variant_dict(data):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user