forked from Juniper/contrail-third-party
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bottle_patch1.diff
23 lines (21 loc) · 996 Bytes
/
bottle_patch1.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/third_party/bottle-0.11.6/bottle.py b/third_party/bottle-0.11.6/bottle.py
index a4a7e79..df35536 100644
--- a/third_party/bottle-0.11.6/bottle.py
+++ b/third_party/bottle-0.11.6/bottle.py
@@ -19,6 +19,8 @@ __author__ = 'Marcel Hellkamp'
__version__ = '0.11.6'
__license__ = 'MIT'
+import cgitb
+
# The gevent server adapter needs to patch some modules before they are imported
# This is why we parse the commandline parameters here but handle them later
if __name__ == '__main__':
@@ -773,7 +775,8 @@ class Bottle(object):
if not self.catchall: raise
stacktrace = format_exc()
environ['wsgi.errors'].write(stacktrace)
- return HTTPError(500, "Internal Server Error", _e(), stacktrace)
+ detailed_tb = cgitb.text(sys.exc_info())
+ return HTTPError(500, detailed_tb, _e(), stacktrace)
def _cast(self, out, peek=None):
""" Try to convert the parameter into something WSGI compatible and set