Skip to content

Commit

Permalink
trelloclient : add optional import of PyOpenSSL useful for python < 2…
Browse files Browse the repository at this point in the history
….7.9 and 3.2 to prevent security issues with openssl (More info : https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning)
  • Loading branch information
nMustaki committed Jul 26, 2015
1 parent daf6bbe commit a61fcf9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions trello/trelloclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
from trello.webhook import WebHook
from trello.exceptions import *

try:
# PyOpenSSL works around some issues in python ssl modules
# In particular in python < 2.7.9 and python < 3.2
# It is not a hard requirement, so it's not listed in requirements.txt
# More info https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning
import urllib3.contrib.pyopenssl
urllib3.contrib.pyopenssl.inject_into_urllib3()
except:
pass


class TrelloClient(object):
""" Base class for Trello API access """
Expand Down

0 comments on commit a61fcf9

Please sign in to comment.