qubole/qds-sdk-py

skip_ssl_cert_check is inverted

vogxn opened this issue · 1 comments

When using the cmd line it is passed correctly.

From cmd line:

qds.py --skip_ssl_cert_check --token=$AUTH_TOKEN --url=https://api.qubole.com/api/ --version=latest cluster list --label default

But when called using the SDK's method the argument should be skip_ssl_check=False to skip the verification and skip_ssl_check=True to apply the verification. This is inverted. May be calling the variable ssl_verify=True|False makes more sense

From SDK (to apply SSL check):

Qubole.configure(
        api_token=cfg.get(config.option.environment, 'auth_token'),
        api_url=cfg.get(config.option.environment, 'api_url'),
        skip_ssl_cert_check=True
    )

Because the request args sent is inverted below

kwargs = {'headers': self._headers, 'auth': self.auth, 'verify': not self.skip_ssl_cert_check}

I think it's not inverted. When you want to skip verification skip_ should be True, which is the case right now.

Though, I agree that avoiding the double negative should have been better.