From 731719d4a05c12adb75cf075f769ef26e7b81ef2 Mon Sep 17 00:00:00 2001 From: Eli Qiao Date: Fri, 24 Apr 2015 15:47:33 +0800 Subject: [PATCH] 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 --- nova/exception.py | 1 + 1 file changed, 1 insertion(+) diff --git a/nova/exception.py b/nova/exception.py index 09bcfa59fdb9..c656c00caaab 100644 --- a/nova/exception.py +++ b/nova/exception.py @@ -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):