Message307745
Yes, I think this is a good idea. Would you like to submit a PR for it?
FWIW, we have this code in Mailman 3:
class Mailbox(MMDF):
"""A mailbox that interoperates with the 'with' statement."""
def __enter__(self):
self.lock()
return self
def __exit__(self, *exc):
self.flush()
self.unlock()
# Don't suppress the exception.
return False |
|
Date |
User |
Action |
Args |
2017-12-06 15:45:38 | barry | set | recipients:
+ barry, sblondon |
2017-12-06 15:45:38 | barry | set | messageid: <1512575138.45.0.213398074469.issue32234@psf.upfronthosting.co.za> |
2017-12-06 15:45:38 | barry | link | issue32234 messages |
2017-12-06 15:45:38 | barry | create | |
|