Michael Pasternak has uploaded a new change for review. Change subject: sdk: raise NoCertificatesError only when no ca_file ......................................................................
sdk: raise NoCertificatesError only when no ca_file Change-Id: Ic1f665c63ebf1fdb97525647348c7df2c604ac5a Signed-off-by: Michael Pasternak <[email protected]> --- M src/ovirtsdk/infrastructure/errors.py M src/ovirtsdk/web/connection.py 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine-sdk refs/changes/78/7678/1 diff --git a/src/ovirtsdk/infrastructure/errors.py b/src/ovirtsdk/infrastructure/errors.py index aa09da1..f51c8be 100644 --- a/src/ovirtsdk/infrastructure/errors.py +++ b/src/ovirtsdk/infrastructure/errors.py @@ -27,7 +27,7 @@ class NoCertificatesError(Exception): def __init__(self): - Exception.__init__(self, '[ERROR]::key_file, cert_file, ca_file must be specified for SSL connection.') + Exception.__init__(self, '[ERROR]::ca_file (CA certificate) must be specified for SSL connection.') class RequestError(Exception): def __init__(self, response): diff --git a/src/ovirtsdk/web/connection.py b/src/ovirtsdk/web/connection.py index 28ab12f..cded985 100644 --- a/src/ovirtsdk/web/connection.py +++ b/src/ovirtsdk/web/connection.py @@ -95,7 +95,7 @@ u = self.__parse_url(url) if(u.scheme == 'https'): - if not insecure and (not ca_file or not key_file or not cert_file): + if not insecure and not ca_file: raise NoCertificatesError return HTTPSConnection(host=u.hostname, -- To view, visit http://gerrit.ovirt.org/7678 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1f665c63ebf1fdb97525647348c7df2c604ac5a Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Michael Pasternak <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
