Skip to content

Commit 3bd621c

Browse files
committed
Warn about bundled certs on creation not import.
1 parent a7e495f commit 3bd621c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

github2/request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,7 @@
5252
if path.exists('/usr/local/share/certs/ca-root-nss.crt'):
5353
CA_CERTS = '/usr/local/share/certs/ca-root-nss.crt'
5454
SYSTEM_CERTS = True
55-
if SYSTEM_CERTS:
56-
LOGGER.info('Using system certificates in %r', httplib2.CA_CERTS)
5755
else:
58-
LOGGER.warning('Using bundled certificates for HTTPS connections')
5956
CA_CERTS = path.join(path.dirname(path.abspath(__file__)),
6057
"DigiCert_High_Assurance_EV_Root_CA.crt")
6158

@@ -142,7 +139,10 @@ def __init__(self, username=None, api_token=None, url_prefix=None,
142139
proxy_host, proxy_port)
143140
self._http = httplib2.Http(proxy_info=proxy_info, cache=cache)
144141
self._http.ca_certs = CA_CERTS
145-
142+
if SYSTEM_CERTS:
143+
LOGGER.info('Using system certificates in %r', CA_CERTS)
144+
else:
145+
LOGGER.warning('Using bundled certificate for HTTPS connections')
146146

147147
def encode_authentication_data(self, extra_post_data):
148148
post_data = []

0 commit comments

Comments
 (0)