Overwrite NovaException message

I see nova reports DeprecationWarning message when using exception.message.

DeprecationWarning: BaseException.message has been deprecated as of Python 2.6

This can be fixed by overwrite message in our Nova base Exception.

Closes-Bug: #1447946
Change-Id: I7270e06622131af1565f748f69aa3497ca7ef4d2
This commit is contained in:
Eli Qiao 2015-04-24 15:47:33 +08:00
parent e8707aa3b5
commit 731719d4a0
1 changed files with 1 additions and 0 deletions

View File

@ -131,6 +131,7 @@ class NovaException(Exception):
# at least get the core message out if something happened
message = self.msg_fmt
self.message = message
super(NovaException, self).__init__(message)
def format_message(self):