Wrong exception

This commit is contained in:
Gavin M. Roy 2016-03-24 16:36:49 -04:00
parent e4928b1cff
commit 69888b6b71

View file

@ -104,9 +104,10 @@ class DynamoDB(object):
if http_err.code == 599:
future.set_exception(exceptions.TimeoutException())
else:
response_reason = err.code
if err.response and hasattr(err.response, 'body'):
response_reason = err.response.body
response_reason = http_err.code
if http_err.response and \
hasattr(http_err.response, 'body'):
response_reason = http_err.response.body
future.set_exception(response_reason)
except Exception as exception:
future.set_exception(exception)