Mercurial > genshi > genshi-test
comparison genshi/template/plugin.py @ 798:c690de5abafd stable-0.5.x
Ported [914], [970], and [971] to 0.5.x branch.
author | cmlenz |
---|---|
date | Thu, 15 Jan 2009 23:50:09 +0000 |
parents | cf0a0a066aec |
children | 0d9e87c6cf6e |
comparison
equal
deleted
inserted
replaced
797:890dc65c3e75 | 798:c690de5abafd |
---|---|
55 except ValueError: | 55 except ValueError: |
56 raise ConfigurationError('Invalid value for max_cache_size: "%s"' % | 56 raise ConfigurationError('Invalid value for max_cache_size: "%s"' % |
57 options.get('genshi.max_cache_size')) | 57 options.get('genshi.max_cache_size')) |
58 | 58 |
59 loader_callback = options.get('genshi.loader_callback', None) | 59 loader_callback = options.get('genshi.loader_callback', None) |
60 if loader_callback and not callable(loader_callback): | 60 if loader_callback and not hasattr(loader_callback, '__call__'): |
61 raise ConfigurationError('loader callback must be a function') | 61 raise ConfigurationError('loader callback must be a function') |
62 | 62 |
63 lookup_errors = options.get('genshi.lookup_errors', 'strict') | 63 lookup_errors = options.get('genshi.lookup_errors', 'strict') |
64 if lookup_errors not in ('lenient', 'strict'): | 64 if lookup_errors not in ('lenient', 'strict'): |
65 raise ConfigurationError('Unknown lookup errors mode "%s"' % | 65 raise ConfigurationError('Unknown lookup errors mode "%s"' % |