From 13814cccb2d5a342559da93be3879462674fc66c Mon Sep 17 00:00:00 2001 From: Yun Mao Date: Mon, 7 May 2012 18:54:09 -0400 Subject: [PATCH] fixes bug 999206 override the __unicode__() method too for python 2.6 Change-Id: Iec76c49585e29071415d937861e94d14ff22cc04 --- nova/rpc/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/rpc/common.py b/nova/rpc/common.py index 33aea9bc..3f818977 100644 --- a/nova/rpc/common.py +++ b/nova/rpc/common.py @@ -205,7 +205,7 @@ def deserialize_remote_exception(conf, data): ex_type = type(failure) str_override = lambda self: message new_ex_type = type(ex_type.__name__ + "_Remote", (ex_type,), - {'__str__': str_override}) + {'__str__': str_override, '__unicode__': str_override}) try: # NOTE(ameade): Dynamically create a new exception type and swap it in # as the new type for the exception. This only works on user defined