If the keyed message exists, remove it.
(self, key)
| 336 | os.remove(os.path.join(self._path, self._lookup(key))) |
| 337 | |
| 338 | def discard(self, key): |
| 339 | """If the keyed message exists, remove it.""" |
| 340 | # This overrides an inapplicable implementation in the superclass. |
| 341 | try: |
| 342 | self.remove(key) |
| 343 | except (KeyError, FileNotFoundError): |
| 344 | pass |
| 345 | |
| 346 | def __setitem__(self, key, message): |
| 347 | """Replace the keyed message; raise KeyError if it doesn't exist.""" |