diff options
author | R. Tyler Croy <tyler@monkeypox.org> | 2011-04-22 17:11:43 -0700 |
---|---|---|
committer | R. Tyler Croy <tyler@monkeypox.org> | 2011-04-22 17:12:56 -0700 |
commit | 073876f66e35501e289cc5dd1d60672e88c893f2 (patch) | |
tree | e9e8f069699fec4110300304270536d04425dc2e /cheetah | |
parent | 1f3e4ed66a343f21f6171e42b7222b5189a1fdce (diff) | |
download | python-cheetah-next.tar.gz |
Apply patch to fix another UnicodeEncodeErrornext
Reported by Carles Muñoz Gorriz in the Debian bug tracker:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584966>
Change-Id: Ic6db91b5da9966eaf5b26e2d7170e667915d57c2
Diffstat (limited to 'cheetah')
-rw-r--r-- | cheetah/Compiler.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cheetah/Compiler.py b/cheetah/Compiler.py index 3f23e4d..80847ff 100644 --- a/cheetah/Compiler.py +++ b/cheetah/Compiler.py @@ -1476,8 +1476,12 @@ class ClassCompiler(GenUtils): return '\n\n'.join(methodDefs) def attributes(self): - attribs = [self.setting('indentationStep') + str(attrib) - for attrib in self._generatedAttribs ] + try: + attribs = [self.setting('indentationStep') + str(attrib) + for attrib in self._generatedAttribs ] + except UnicodeEncodeError: + attribs = [self.setting('indentationStep') + unicode(attrib) + for attrib in self._generatedAttribs ] return '\n\n'.join(attribs) class AutoClassCompiler(ClassCompiler): |