Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

get rid of bw compat hair which presumes we can't get mako installed

  • Loading branch information...
commit 6a7d55ba136c5efe011f031b06b074d8908b2e24 1 parent 6ced2a2
@mcdonc mcdonc authored
Showing with 4 additions and 28 deletions.
  1. +1 −0  .gitignore
  2. +3 −28 pyramid_mako/__init__.py
View
1  .gitignore
@@ -10,3 +10,4 @@ dist/
.tox
nosetests.xml
pyramid_jinja2/coverage.xml
+coverage.xml
View
31 pyramid_mako/__init__.py
@@ -23,34 +23,9 @@
from pyramid.settings import asbool
from pyramid.util import DottedNameResolver
-def _no_mako(*arg, **kw): # pragma: no cover
- raise NotImplementedError(
- "'mako' package is not importable (maybe downgrade MarkupSafe to "
- "0.16 or below if you're using Python 3.2)"
- )
-
-try:
- from mako.lookup import TemplateLookup
-except (ImportError, SyntaxError, AttributeError): #pragma NO COVER
- class TemplateLookup(object):
- def __init__(self, **kw):
- for name in ('adjust_uri', 'get_template', 'filename_to_uri',
- 'put_string', 'put_template'):
- setattr(self, name, _no_mako)
- self.filesystem_checks = False
-
-try:
- from mako.exceptions import TopLevelLookupException
-except (ImportError, SyntaxError, AttributeError): #pragma NO COVER
- class TopLevelLookupException(Exception):
- pass
-
-try:
- from mako.exceptions import text_error_template
-except (ImportError, SyntaxError, AttributeError): #pragma NO COVER
- def text_error_template(lookup=None):
- _no_mako()
-
+from mako.lookup import TemplateLookup
+from mako.exceptions import TopLevelLookupException
+from mako.exceptions import text_error_template
class IMakoLookup(Interface):
pass
Please sign in to comment.
Something went wrong with that request. Please try again.