Due to change c1a7079c26d27a2e46cca26963d3d9aa040bdbe8 in
oslo.serialization, serialized exceptions in errors no longer
have kwargs. This change fixes the problem by adding __repr__
to NovaException which will return a string representation
of exception.__dict__. This string contains the exception message
along with all the kwargs. Without __repr__, the serialization
process for exceptions just returns the exception type and the
default message, without the kwargs.
Change-Id: I653282a030d03362dfca0fd1026cebe920d54e37
Closes-Bug: #1756360
(cherry picked from commit cc457dfffad7c4980e6f36364bdf190c79cf23e1)
Reviewed: https:/ /review. openstack. org/559158 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=9affdb02977 e1016c7c0cca0b9 b677ad4b3870d3
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 9affdb02977e101 6c7c0cca0b9b677 ad4b3870d3
Author: Tyler Blakeslee <email address hidden>
Date: Fri Mar 23 08:21:27 2018 -0600
Add __repr__ for NovaException
Due to change c1a7079c26d27a2 e46cca26963d3d9 aa040bdbe8 in serialization, serialized exceptions in errors no longer
oslo.
have kwargs. This change fixes the problem by adding __repr__
to NovaException which will return a string representation
of exception.__dict__. This string contains the exception message
along with all the kwargs. Without __repr__, the serialization
process for exceptions just returns the exception type and the
default message, without the kwargs.
Change-Id: I653282a030d033 62dfca0fd1026ce be920d54e37 80e6f36364bdf19 0c79cf23e1)
Closes-Bug: #1756360
(cherry picked from commit cc457dfffad7c49