Record 'defect' on 'obj'. Called by handle_defect if raise_on_defect is False. This method is part of the Policy API so that Policy subclasses can implement custom defect handling. The default implementation calls the append method of the defects attribute of obj.
(self, obj, defect)
| 203 | self.register_defect(obj, defect) |
| 204 | |
| 205 | def register_defect(self, obj, defect): |
| 206 | """Record 'defect' on 'obj'. |
| 207 | |
| 208 | Called by handle_defect if raise_on_defect is False. This method is |
| 209 | part of the Policy API so that Policy subclasses can implement custom |
| 210 | defect handling. The default implementation calls the append method of |
| 211 | the defects attribute of obj. The objects used by the email package by |
| 212 | default that get passed to this method will always have a defects |
| 213 | attribute with an append method. |
| 214 | |
| 215 | """ |
| 216 | obj.defects.append(defect) |
| 217 | |
| 218 | def header_max_count(self, name): |
| 219 | """Return the maximum allowed number of headers named 'name'. |