diff --git a/account.py b/account.py index 63791ac626..62b7ab094f 100644 --- a/account.py +++ b/account.py @@ -5,10 +5,16 @@ import urllib import uuid import braintree -from braintree.exceptions import GatewayTimeoutError, TooManyRequestsError +from braintree.exceptions import TooManyRequestsError from braintree.exceptions.braintree_error import BraintreeError from sql import Literal +try: + from braintree.exceptions import GatewayTimeoutError +except ImportError: + class GatewayTimeoutError(Exception): + pass + from trytond.cache import Cache from trytond.config import config from trytond.i18n import gettext diff --git a/setup.py b/setup.py index 4f3c8ce3d5..feda6b0694 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ else: if local_version: version += '+' + '.'.join(local_version) -requires = ['braintree >= 3.24.0', 'werkzeug'] +requires = ['braintree >= 3.38.0', 'werkzeug'] for dep in info.get('depends', []): if not re.match(r'(ir|res)(\W|$)', dep): requires.append(get_require_version('trytond_%s' % dep))