Ticket #2: airspeed-unicode.patch
| File airspeed-unicode.patch, 0.7 kB (added by steve, 4 years ago) |
|---|
-
airspeed.py
old new 2 2 3 3 import re, operator, os 4 4 5 try: import cStringIO as StringIO 6 except ImportError: import StringIO 5 #try: import cStringIO as StringIO 6 #except ImportError: import StringIO 7 import StringIO 7 8 8 9 __all__ = ['Template', 'TemplateError', 'TemplateSyntaxError', 'CachingFileLoader'] 9 10 … … 405 406 if value is None: 406 407 if self.silent: value = '' 407 408 else: value = self.my_text() 408 stream.write(str(value)) 409 if not isinstance(value, basestring): 410 stream.write(str(value)) 411 else: 412 stream.write(value) 409 413 410 414 411 415 class SimpleReference(_Element):
