diff --git a/insights/core/remote_resource.py b/insights/core/remote_resource.py index 9e0d53d3c7..3a3d1b185b 100644 --- a/insights/core/remote_resource.py +++ b/insights/core/remote_resource.py @@ -44,10 +44,11 @@ def get(self, url, params={}, headers={}, auth=(), certificate_path=None): Returns: response: (HttpResponse): Response object from requests.get api request """ - - certificate_path = certificate_path if certificate_path else False - return self.session.get(url, params=params, headers=headers, verify=certificate_path, auth=auth, - timeout=self.timeout) + if certificate_path: + return self.session.get(url, params=params, headers=headers, + verify=certificate_path, auth=auth, timeout=self.timeout) + return self.session.get(url, params=params, headers=headers, + auth=auth, timeout=self.timeout) class CachedRemoteResource(RemoteResource):