~communesplone/appy/communesplone

« back to all changes in this revision

Viewing changes to pod/buffers.py

  • Committer: Gaetan Delannay
  • Date: 2011-06-28 07:12:20 UTC
  • Revision ID: gaetan.delannay@gmail.com-20110628071220-y4h06rv391t8hwmd
appy.bin: job.py: allow to specify several commands to execute (to separate with semicolons); appy.gen: translate: added the possibility to escape XML special chars in translations; appy.pod: bugfix in buffers.write: if content is already utf-8-encoded it does not crash anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
177
177
    def getLength(self): return 0
178
178
 
179
179
    def write(self, something):
180
 
        self.content.write(something.encode('utf-8'))
 
180
        try:
 
181
            self.content.write(something.encode('utf-8'))
 
182
        except UnicodeDecodeError:
 
183
            self.content.write(something)
181
184
 
182
185
    def addExpression(self, expression):
183
186
        try: