Skip to content
Browse files

Apply patch to fix another UnicodeEncodeError

Reported by Carles Muñoz Gorriz in the Debian bug tracker:
    <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584966>

Change-Id: Ic6db91b5da9966eaf5b26e2d7170e667915d57c2
  • Loading branch information...
1 parent 1f3e4ed commit 073876f66e35501e289cc5dd1d60672e88c893f2 @rtyler committed Apr 22, 2011
Showing with 6 additions and 2 deletions.
  1. +6 −2 cheetah/Compiler.py
View
8 cheetah/Compiler.py
@@ -1476,8 +1476,12 @@ def methodDefs(self):
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):

0 comments on commit 073876f

Please sign in to comment.
Something went wrong with that request. Please try again.