Show More
@@ -18,6 +18,7 b' from . import (' | |||
|
18 | 18 | node, |
|
19 | 19 | pycompat, |
|
20 | 20 | registrar, |
|
21 | smartset, | |
|
21 | 22 | templateutil, |
|
22 | 23 | url, |
|
23 | 24 | util, |
@@ -108,6 +109,9 b' def basename(path):' | |||
|
108 | 109 | @templatefilter(b'cbor') |
|
109 | 110 | def cbor(obj): |
|
110 | 111 | """Any object. Serializes the object to CBOR bytes.""" |
|
112 | if isinstance(obj, smartset.abstractsmartset): | |
|
113 | # cborutil is stricter about type than json() filter | |
|
114 | obj = list(obj) | |
|
111 | 115 | return b''.join(cborutil.streamencode(obj)) |
|
112 | 116 | |
|
113 | 117 |
General Comments 0
You need to be logged in to leave comments.
Login now