Insert an exception stub for Python 2.7

This commit is contained in:
Gavin M. Roy 2016-06-14 12:18:34 -04:00
parent 33adf14265
commit 1ab58a01be
2 changed files with 14 additions and 0 deletions

View file

@ -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__)

View file

@ -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):