Skip to content

Commit

Permalink
[win32] fix crt path lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
conorbranagan committed Nov 15, 2012
1 parent b4c8c56 commit a50f9b7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,13 @@ def set_win32_cert_path():
will be able to override this in a clean way. For now, we have to monkey patch
tornado.httpclient._DEFAULT_CA_CERTS
'''
crt_path = os.path.join(os.environ['PROGRAMFILES'], 'Datadog', 'Datadog Agent',
'ca-certificates.crt')
if hasattr(sys, 'frozen'):
# we're frozen - from py2exe
prog_path = os.path.dirname(sys.executable)
path = os.path.join(prog_path, 'ca-certificates.crt')
else:
cur_path = os.path.dirname(__file__)
path = os.path.join(cur_path, 'ca-certificates.crt')
import tornado.simple_httpclient
tornado.simple_httpclient._DEFAULT_CA_CERTS = crt_path

Expand Down

0 comments on commit a50f9b7

Please sign in to comment.