Show More
@@ -461,7 +461,8 b' def evalfuncarg(context, mapping, arg):' | |||
|
461 | 461 | # is fixed. we can't do that right now because join() has to take a generator |
|
462 | 462 | # of byte strings as it is, not a lazy byte string. |
|
463 | 463 | def _unwrapvalue(context, mapping, thing): |
|
464 | thing = unwrapvalue(context, mapping, thing) | |
|
464 | if isinstance(thing, wrapped): | |
|
465 | return thing.tovalue(context, mapping) | |
|
465 | 466 | # evalrawexp() may return string, generator of strings or arbitrary object |
|
466 | 467 | # such as date tuple, but filter does not want generator. |
|
467 | 468 | return _unthunk(context, mapping, thing) |
@@ -476,7 +477,8 b' def evalboolean(context, mapping, arg):' | |||
|
476 | 477 | thing = stringutil.parsebool(data) |
|
477 | 478 | else: |
|
478 | 479 | thing = func(context, mapping, data) |
|
479 | thing = unwrapvalue(context, mapping, thing) | |
|
480 | if isinstance(thing, wrapped): | |
|
481 | thing = thing.tovalue(context, mapping) | |
|
480 | 482 | if isinstance(thing, bool): |
|
481 | 483 | return thing |
|
482 | 484 | # other objects are evaluated as strings, which means 0 is True, but |
General Comments 0
You need to be logged in to leave comments.
Login now