Tidy up any resources used by the handler. This version removes the handler from an internal map of handlers, _handlers, which is used for handler lookup by name. Subclasses should ensure that this gets called from overridden close() methods.
(self)
| 996 | pass |
| 997 | |
| 998 | def close(self): |
| 999 | """ |
| 1000 | Tidy up any resources used by the handler. |
| 1001 | |
| 1002 | This version removes the handler from an internal map of handlers, |
| 1003 | _handlers, which is used for handler lookup by name. Subclasses |
| 1004 | should ensure that this gets called from overridden close() |
| 1005 | methods. |
| 1006 | """ |
| 1007 | #get the module data lock, as we're updating a shared structure. |
| 1008 | _acquireLock() |
| 1009 | try: #unlikely to raise an exception, but you never know... |
| 1010 | self._closed = True |
| 1011 | if self._name and self._name in _handlers: |
| 1012 | del _handlers[self._name] |
| 1013 | finally: |
| 1014 | _releaseLock() |
| 1015 | |
| 1016 | def handleError(self, record): |
| 1017 | """ |