If the keyed message exists, remove it.
(self, key)
| 343 | os.remove(os.path.join(self._path, self._lookup(key))) |
| 344 | |
| 345 | def discard(self, key): |
| 346 | """If the keyed message exists, remove it.""" |
| 347 | # This overrides an inapplicable implementation in the superclass. |
| 348 | try: |
| 349 | self.remove(key) |
| 350 | except (KeyError, FileNotFoundError): |
| 351 | pass |
| 352 | |
| 353 | def __setitem__(self, key, message): |
| 354 | """Replace the keyed message; raise KeyError if it doesn't exist.""" |