diff -r d7346b6e518b foolscap/call.py
a
|
b
|
|
4 | 4 | |
5 | 5 | from foolscap import copyable, slicer, tokens |
6 | 6 | from foolscap.copyable import AttributeDictConstraint |
7 | | from foolscap.constraint import ByteStringConstraint |
| 7 | from foolscap.constraint import ByteStringConstraint, IntegerConstraint |
8 | 8 | from foolscap.slicers.list import ListConstraint |
9 | 9 | from tokens import BananaError, Violation |
10 | 10 | from foolscap.util import AsyncAND |
… |
… |
|
23 | 23 | ('value', ByteStringConstraint(1000)), |
24 | 24 | ('traceback', ByteStringConstraint(2000)), |
25 | 25 | ('parents', ListConstraint(ByteStringConstraint(200))), |
| 26 | ('count', IntegerConstraint()), |
26 | 27 | ] |
27 | 28 | AttributeDictConstraint.__init__(self, *attrs) |
28 | 29 | |
… |
… |
|
801 | 802 | # Exception.__repr__ returns. |
802 | 803 | state['value'] = truncate(state['value'], 1000) |
803 | 804 | state['type'] = truncate(state['type'], 200) |
| 805 | if hasattr(obj, "count"): |
| 806 | state["count"] = obj.count |
804 | 807 | |
805 | 808 | if broker.unsafeTracebacks: |
806 | 809 | if isinstance(obj.type, str): |