Mark Sapiro pushed to branch master at GNU Mailman / Mailman Core

Commits:
5569daa3 by Mark Sapiro at 2018-02-26T16:41:48-08:00
Fix handlers/after_delivery.py to properly update last_post_at.

- - - - -
5bff9c43 by Mark Sapiro at 2018-02-27T01:46:10+00:00
Merge branch 'last_post' into 'master'

Fix handlers/after_delivery.py to properly update last_post_at.

Closes #453

See merge request mailman/mailman!362
- - - - -


3 changed files:

- src/mailman/docs/NEWS.rst
- src/mailman/handlers/after_delivery.py
- src/mailman/handlers/docs/after-delivery.rst


Changes:

=====================================
src/mailman/docs/NEWS.rst
=====================================
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -54,6 +54,7 @@ Bugs
   ``pendedkeyvalue`` table.  (Closes #385)
 * Messages with ``Subject`` headers encoded in an unknown character set no
   longer throw ``LookupError`` in subject prefixing.  (Closes #445)
+* A list's ``last_post_at`` is now properly updated.  (Closes #453)
 
 Command line
 ------------


=====================================
src/mailman/handlers/after_delivery.py
=====================================
--- a/src/mailman/handlers/after_delivery.py
+++ b/src/mailman/handlers/after_delivery.py
@@ -34,5 +34,5 @@ class AfterDelivery:
 
     def process(self, mlist, msg, msgdata):
         """See `IHander`."""
-        mlist.last_post_time = now()
+        mlist.last_post_at = now()
         mlist.post_id += 1


=====================================
src/mailman/handlers/docs/after-delivery.rst
=====================================
--- a/src/mailman/handlers/docs/after-delivery.rst
+++ b/src/mailman/handlers/docs/after-delivery.rst
@@ -10,10 +10,10 @@ bookkeeping pieces of information are updated.
     >>> from mailman.utilities.datetime import now
     >>> mlist = create_list('_xt...@example.com')
     >>> post_time = now() - timedelta(minutes=10)
-    >>> mlist.last_post_time = post_time
+    >>> mlist.last_post_at = post_time
     >>> mlist.post_id = 10
 
-Processing a message with this handler updates the last_post_time and post_id
+Processing a message with this handler updates the last_post_at and post_id
 attributes.
 ::
 
@@ -25,7 +25,7 @@ attributes.
 
     >>> handler = config.handlers['after-delivery']
     >>> handler.process(mlist, msg, {})
-    >>> mlist.last_post_time > post_time
+    >>> mlist.last_post_at > post_time
     True
     >>> mlist.post_id
     11



View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/483de45545ed87f0559a46bd008610f6fa19dfd2...5bff9c43469eaa29ca26ccce1fca3662a8601c0f

---
View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/483de45545ed87f0559a46bd008610f6fa19dfd2...5bff9c43469eaa29ca26ccce1fca3662a8601c0f
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to