]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Fix BaseException.message DeprecationWarning
authorSteven Hardy <shardy@redhat.com>
Wed, 19 Jun 2013 13:27:00 +0000 (14:27 +0100)
committerSteven Hardy <shardy@redhat.com>
Thu, 20 Jun 2013 13:29:11 +0000 (14:29 +0100)
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

heat/common/wsgi.py

index 2f0ecbcbe39e46bdf7add03c5addcbda188765af..4b31d30f6199cf8ffa0100633fa01d4e36523f5e 100644 (file)
@@ -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