equal
deleted
inserted
replaced
22 |
22 |
23 class ResourceUnavailable(error.Abort): |
23 class ResourceUnavailable(error.Abort): |
24 pass |
24 pass |
25 |
25 |
26 class TemplateNotFound(error.Abort): |
26 class TemplateNotFound(error.Abort): |
|
27 pass |
|
28 |
|
29 # stub for representing a date type; may be a real date type that can |
|
30 # provide a readable string value |
|
31 class date(object): |
27 pass |
32 pass |
28 |
33 |
29 class hybrid(object): |
34 class hybrid(object): |
30 """Wrapper for list or dict to support legacy template |
35 """Wrapper for list or dict to support legacy template |
31 |
36 |
359 return stringify(thing) |
364 return stringify(thing) |
360 |
365 |
361 _unwrapfuncbytype = { |
366 _unwrapfuncbytype = { |
362 None: _unwrapvalue, |
367 None: _unwrapvalue, |
363 bytes: stringify, |
368 bytes: stringify, |
|
369 date: unwrapdate, |
364 int: unwrapinteger, |
370 int: unwrapinteger, |
365 } |
371 } |
366 |
372 |
367 def unwrapastype(thing, typ): |
373 def unwrapastype(thing, typ): |
368 """Move the inner value object out of the wrapper and coerce its type""" |
374 """Move the inner value object out of the wrapper and coerce its type""" |