------------------------------------------------------------ revno: 1683 fixes bug: https://launchpad.net/bugs/266464 committer: Mark Sapiro <m...@msapiro.net> branch nick: 2.1 timestamp: Wed 2016-11-16 15:27:10 -0800 message: Enhanced the fix for race conditions in MailList().Load(). modified: Mailman/MailList.py NEWS
-- lp:mailman/2.1 https://code.launchpad.net/~mailman-coders/mailman/2.1 Your team Mailman Checkins is subscribed to branch lp:mailman/2.1. To unsubscribe from this branch go to https://code.launchpad.net/~mailman-coders/mailman/2.1/+edit-subscription
=== modified file 'Mailman/MailList.py' --- Mailman/MailList.py 2016-05-18 05:54:07 +0000 +++ Mailman/MailList.py 2016-11-16 23:27:10 +0000 @@ -634,6 +634,7 @@ if e.errno <> errno.ENOENT: raise # The file doesn't exist yet return None, e + now = int(time.time()) try: try: dict = loadfunc(fp) @@ -645,8 +646,9 @@ finally: fp.close() # Update the timestamp. We use current time here rather than mtime - # so the test above might succeed the next time. - self.__timestamp = int(time.time()) + # so the test above might succeed the next time. And we get the time + # before unpickling in case it takes more than a second. (LP: #266464) + self.__timestamp = now return dict, None def Load(self, check_version=True): === modified file 'NEWS' --- NEWS 2016-10-29 17:05:15 +0000 +++ NEWS 2016-11-16 23:27:10 +0000 @@ -23,6 +23,8 @@ Bug fixes and other patches + - Enhanced the fix for race conditions in MailList().Load(). (LP: #266464) + - Fixed a typo in Utils.py that could have resulted in a NameError in logging an unlikely occurrence. (LP: #1637745)
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org