From f6a3e3c90fe7667a046de6fd982902e24f497e77 Mon Sep 17 00:00:00 2001
From: Wannes Rombouts <wapiflapi@yahoo.fr>
Date: Thu, 30 May 2013 17:41:16 +0200
Subject: [PATCH] Re-added .message on exception for old python versions

---
 src/webapp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/webapp.py b/src/webapp.py
index b547bf1..778e817 100644
--- a/src/webapp.py
+++ b/src/webapp.py
@@ -132,7 +132,7 @@ class exceptionsToHTTPError(exceptionManager):
         exceptionManager.__init__(self, exceptions or self.exceptions)
 
     def handle(self, exc_type, exc_value, traceback):
-        msg = self.message.format(exception=exc_value.message, **self.msg_args)
+        msg = self.message.format(exception=getattr(exc_value, "message", str(exc_value)), **self.msg_args)
         raise self.HTTPError(message=msg)
 
 class nargString(list):
-- 
GitLab