SSL not supported anymore

Signed-off-by: Jean-Philippe Dutreve <jdutreve@winancial.com>
This commit is contained in:
Jean-Philippe Dutreve 2015-05-20 16:34:35 +02:00 committed by Florent
commit 399393871a

View file

@ -18,6 +18,8 @@
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
import ssl
from weboob.browser import LoginBrowser, URL, need_login
from weboob.exceptions import BrowserIncorrectPassword
@ -36,6 +38,15 @@ class GanAssurances(LoginBrowser):
self.BASEURL = 'https://%s' % website
super(GanAssurances, self).__init__(*args, **kwargs)
def prepare_request(self, req):
"""
Gan Assurances does not support SSL anymore.
"""
preq = super(GanAssurances, self).prepare_request(req)
conn = self.session.adapters['https://'].get_connection(preq.url)
conn.ssl_version = ssl.PROTOCOL_TLSv1
return preq
def do_login(self):
"""
Attempt to log in.