Show More
@@ -224,9 +224,9 def str_safe(arg): | |||
|
224 | 224 | except Exception,msg: |
|
225 | 225 | # let's keep this little duplication here, so that the most common |
|
226 | 226 | # case doesn't suffer from a double try wrapping. |
|
227 |
out = '<ERROR |
|
|
227 | out = '<ERROR: %s>' % msg | |
|
228 | 228 | except Exception,msg: |
|
229 |
out = '<ERROR |
|
|
229 | out = '<ERROR: %s>' % msg | |
|
230 | 230 | #raise # dbg |
|
231 | 231 | return out |
|
232 | 232 |
@@ -196,7 +196,7 class Itpl: | |||
|
196 | 196 | for live, chunk in self.chunks: |
|
197 | 197 | if live: app(str(eval(chunk,glob,loc))) |
|
198 | 198 | else: app(chunk) |
|
199 |
out = |
|
|
199 | out = ''.join(result) | |
|
200 | 200 | try: |
|
201 | 201 | return str(out) |
|
202 | 202 | except UnicodeError: |
@@ -212,9 +212,6 class Itpl: | |||
|
212 | 212 | loc, glob = frame.f_locals, frame.f_globals |
|
213 | 213 | |
|
214 | 214 | return self._str(glob,loc) |
|
215 | ||
|
216 | def encode(self, encoding, errors): | |
|
217 | return str(self)#.encode(encoding, errors) | |
|
218 | 215 | |
|
219 | 216 | class ItplNS(Itpl): |
|
220 | 217 | """Class representing a string with interpolation abilities. |
General Comments 0
You need to be logged in to leave comments.
Login now