Ignore:
Timestamp:
10 Jul 2022, 07:01:10 (2 years ago)
Author:
Henrik Bettermann
Message:

Catch SSLError

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py

    r16587 r17014  
    1919"""
    2020from datetime import datetime
     21from ssl import SSLError
    2122import httplib
    2223import hashlib
     
    9293            'amount': amount}
    9394    url = '%s?' % url + urlencode(args)
    94     h.request("GET", url, headers=headers)
     95    try:
     96        h.request("GET", url, headers=headers)
     97    except SSLError:
     98        return {'error': 'SSL handshake error'}
    9599    response = h.getresponse()
    96100    if response.status!=200:
Note: See TracChangeset for help on using the changeset viewer.