summaryrefslogtreecommitdiff
path: root/repoze
diff options
context:
space:
mode:
Diffstat (limited to 'repoze')
-rw-r--r--repoze/bfg/view.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/repoze/bfg/view.py b/repoze/bfg/view.py
index 2c0e3efdc..f099c4665 100644
--- a/repoze/bfg/view.py
+++ b/repoze/bfg/view.py
@@ -1,6 +1,19 @@
import os
import inspect
+import mimetypes
+
+try:
+ # See http://bugs.python.org/issue5853 which is a recursion bug
+ # that seems to effect Python 2.6, Python 2.6.1, and 2.6.2 (a fix
+ # has been applied on the Python 2 trunk). This workaround should
+ # really be in Paste if anywhere, but it's easiest to just do it
+ # here and get it over with to avoid needing to deal with any
+ # fallout.
+ mimetypes.init()
+except AttributeError:
+ pass
+
from paste.urlparser import StaticURLParser
from zope.component import queryMultiAdapter
@@ -19,6 +32,7 @@ deprecated('view_execution_permitted',
"view_execution_permitted')",
)
+
_marker = object()
def render_view_to_response(context, request, name='', secure=True):