From 19a1911b2b1687025f774bedb49236c31a8e1874 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Fri, 4 Nov 2011 13:57:04 -0700 Subject: [PATCH] Define faults.Fault.__str__. Define faults.Fault.__str__ to pass through to the wrapped exception. This is useful for log messages. Change-Id: Ie566fb67fc6bd29c2ef3b3aefd263507d48e8cfc --- nova/api/openstack/faults.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nova/api/openstack/faults.py b/nova/api/openstack/faults.py index 0ef863eed6b..1bf0df2f538 100644 --- a/nova/api/openstack/faults.py +++ b/nova/api/openstack/faults.py @@ -73,6 +73,9 @@ def __call__(self, req): return self.wrapped_exc + def __str__(self): + return self.wrapped_exc.__str__() + class OverLimitFault(webob.exc.HTTPException): """