Exception.message deprecated in py26 (bug 1070890)
In the case of IntegrityError (e), e is wrapping a DBAPIError[1] with more
information about the context of the exception -- context that we do NOT
want to expose to our own API users (however, that context should still
be logged). In the case of an integrity error, str(e.orig) will produce
exactly what we're producing with e.message today: a user-friendly
message such as 'column name is not unique'
This change should not impact what is logged or returned to the API
user -- just eliminate the deprecation warning.
Reviewed: https:/ /review. openstack. org/14767 github. com/openstack/ keystone/ commit/ 5bb5e7a3503536c 0439aa4e1948291 648c2a0277
Committed: http://
Submitter: Jenkins
Branch: master
commit 5bb5e7a3503536c 0439aa4e1948291 648c2a0277
Author: Dolph Mathews <email address hidden>
Date: Wed Oct 24 10:13:54 2012 -0500
Exception. message deprecated in py26 (bug 1070890)
In the case of IntegrityError (e), e is wrapping a DBAPIError[1] with more
information about the context of the exception -- context that we do NOT
want to expose to our own API users (however, that context should still
be logged). In the case of an integrity error, str(e.orig) will produce
exactly what we're producing with e.message today: a user-friendly
message such as 'column name is not unique'
This change should not impact what is logged or returned to the API
user -- just eliminate the deprecation warning.
[1]: http:// docs.sqlalchemy .org/en/ rel_0_7/ core/exceptions .html#sqlalchem y.exc.DBAPIErro r
Change-Id: Ie3a5d93fbb5a7b 90ad3b205bc8610 f28b1626431