Mercurial > hg > contenttransformer
changeset 14:7dae51af8db6
ugly f-ing hack
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 30 Jun 2010 22:32:33 -0700 |
parents | 9d51954e2e68 |
children | 946176949bba |
files | contenttransformer/app.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contenttransformer/app.py Wed Jun 30 22:09:13 2010 -0700 +++ b/contenttransformer/app.py Wed Jun 30 22:32:33 2010 -0700 @@ -19,7 +19,7 @@ for pattern, transformer_name in self.types: if '/' in transformer_name: continue - assert transformer_name in self.transformers + assert transformer_name in self.transformers, '%s not in transformers' % transformer_name def __call__(self, path): """this should return something that is callable with (environ, start_response) to return a response; the transformer thing""" @@ -33,8 +33,7 @@ # XXX hack: -> refactor if '/' in transformer_name: return ContentTypeChanger(content, content_type, transformer_name) - - return self.transformers[transformer_name](content, content_type, **self.kwargs.get(transformer_name, {})) + return self.transformers[transformer_name](content, content_type, **self.kwargs.get(transformer_name.lower(), {})) # XXX hack around ini being retarded return FileApp(path)