From: Steven Hardy Date: Wed, 19 Jun 2013 13:27:00 +0000 (+0100) Subject: Fix BaseException.message DeprecationWarning X-Git-Tag: 2014.1~450^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=fd94427398457601364409f4456c9c093aae78c1;p=openstack-build%2Fheat-build.git Fix BaseException.message DeprecationWarning https://review.openstack.org/#/c/32154/ introduces a deprecated TypeError.message reference, which won't work in python3 and causes a DeprecationWarning to be output on >= python 2.6 Change-Id: Ibd11d4ad6b82e96ede8f38fe76112bd71e98c5c9 --- diff --git a/heat/common/wsgi.py b/heat/common/wsgi.py index 2f0ecbcb..4b31d30f 100644 --- a/heat/common/wsgi.py +++ b/heat/common/wsgi.py @@ -565,7 +565,7 @@ class Resource(object): action_result = self.dispatch(self.controller, action, request, **action_args) except TypeError as err: - logging.error(_('Exception handling resource: %s') % err.message) + logging.error(_('Exception handling resource: %s') % str(err)) raise webob.exc.HTTPBadRequest() # Here we support either passing in a serializer or detecting it