Mercurial > genshi > genshi-test
comparison genshi/template/plugin.py @ 854:0d9e87c6cf6e
More work on reducing the size of the diff produced by 2to3.
author | cmlenz |
---|---|
date | Tue, 10 Nov 2009 22:53:21 +0000 |
parents | 7cf2407671c2 |
children | fbe34d12acde |
comparison
equal
deleted
inserted
replaced
853:4376010bb97e | 854:0d9e87c6cf6e |
---|---|
1 # -*- coding: utf-8 -*- | 1 # -*- coding: utf-8 -*- |
2 # | 2 # |
3 # Copyright (C) 2006-2008 Edgewall Software | 3 # Copyright (C) 2006-2009 Edgewall Software |
4 # Copyright (C) 2006 Matthew Good | 4 # Copyright (C) 2006 Matthew Good |
5 # All rights reserved. | 5 # All rights reserved. |
6 # | 6 # |
7 # This software is licensed as described in the file COPYING, which | 7 # This software is licensed as described in the file COPYING, which |
8 # you should have received as part of this distribution. The terms | 8 # you should have received as part of this distribution. The terms |
46 | 46 |
47 self.default_encoding = options.get('genshi.default_encoding', 'utf-8') | 47 self.default_encoding = options.get('genshi.default_encoding', 'utf-8') |
48 auto_reload = options.get('genshi.auto_reload', '1') | 48 auto_reload = options.get('genshi.auto_reload', '1') |
49 if isinstance(auto_reload, basestring): | 49 if isinstance(auto_reload, basestring): |
50 auto_reload = auto_reload.lower() in ('1', 'on', 'yes', 'true') | 50 auto_reload = auto_reload.lower() in ('1', 'on', 'yes', 'true') |
51 search_path = filter(None, options.get('genshi.search_path', '').split(':')) | 51 search_path = [p for p in |
52 options.get('genshi.search_path', '').split(':') if p] | |
52 self.use_package_naming = not search_path | 53 self.use_package_naming = not search_path |
53 try: | 54 try: |
54 max_cache_size = int(options.get('genshi.max_cache_size', 25)) | 55 max_cache_size = int(options.get('genshi.max_cache_size', 25)) |
55 except ValueError: | 56 except ValueError: |
56 raise ConfigurationError('Invalid value for max_cache_size: "%s"' % | 57 raise ConfigurationError('Invalid value for max_cache_size: "%s"' % |