~gandelman-a/ubuntu/saucy/cheetah/lp1183634

« back to all changes in this revision

Viewing changes to debian/patches/fix_compile_with_utf8_attribute.patch

  • Committer: Bazaar Package Importer
  • Author(s): Scott Moser
  • Date: 2011-06-10 15:55:11 UTC
  • mfrom: (1.1.7 upstream) (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110610155511-w5apepok2sh5lut7
Tags: 2.4.4-2ubuntu1
* Merge from debian unstable.  (LP: #795714) Remaining changes:
  - debian/control: Rename Vcs-* to XS-Debian-Vcs-*.
  - Drop Build-Depends on python-markup, as it's in universe and only
    used -- if available -- for tests
* Dropped changes:
  - debian/rules: Run testsuite cheetah/Tests/Test.py during build 
  - debian/rules: Add PATH=$(CURDIR)/build/scripts-$buildver:$PATH 
    and PYTHONPATH=$(CURDIR)/build/lib.*-$buildver when running 
    testsuitej
    + debian runs test suite now
  - Add debian/patches/02_fedora_cheetah_2.7_compat.patch from Fedora to
    + This is fixed in upstream cheetah now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- a/cheetah/Compiler.py       2010-02-08 05:17:23.000000000 +0100
 
2
+++ b/cheetah/Compiler.py       2010-06-08 06:50:28.000000000 +0200
 
3
@@ -1474,8 +1474,12 @@
 
4
         return '\n\n'.join(methodDefs)
 
5
 
 
6
     def attributes(self):
 
7
-        attribs = [self.setting('indentationStep') + str(attrib)
 
8
-                      for attrib in self._generatedAttribs ]
 
9
+        try:
 
10
+            attribs = [self.setting('indentationStep') + str(attrib)
 
11
+                          for attrib in self._generatedAttribs ]
 
12
+        except UnicodeEncodeError:
 
13
+            attribs = [self.setting('indentationStep') + unicode(attrib)
 
14
+                          for attrib in self._generatedAttribs ]
 
15
         return '\n\n'.join(attribs)
 
16
   
 
17
 class AutoClassCompiler(ClassCompiler):