diff --git a/sprockets/clients/dynamodb/connector.py b/sprockets/clients/dynamodb/connector.py index be3fedf..d3acf8b 100644 --- a/sprockets/clients/dynamodb/connector.py +++ b/sprockets/clients/dynamodb/connector.py @@ -10,6 +10,13 @@ from tornado_aws import exceptions as aws_exceptions from . import utils from . import exceptions +# Stub ConnectionError for Python 2.7 that doesn't support it +try: + ConnectionError +except NameError: + class ConnectionError(Exception): + pass + LOGGER = logging.getLogger(__name__) diff --git a/tests/api_tests.py b/tests/api_tests.py index 930a60d..4a5fb9a 100644 --- a/tests/api_tests.py +++ b/tests/api_tests.py @@ -13,6 +13,13 @@ from tornado_aws import exceptions as aws_exceptions from sprockets.clients import dynamodb from sprockets.clients.dynamodb import exceptions +# Stub ConnectionError for Python 2.7 that doesn't support it +try: + ConnectionError +except NameError: + class ConnectionError(Exception): + pass + class AsyncTestCase(testing.AsyncTestCase):