[Bug 1251495] Re: Lists with topics enabled can throw unexpected keyword argument 'Delete' exception.

ChristianEhrhardt 1251495 at bugs.launchpad.net
Wed Oct 25 10:58:30 EDT 2017


It feels I'm the only one coming by to clean every now and then - feels bad :-/
The change was revno: 1433

For the sake of any progress I made a ppa with the fix available at [1].

I thought lacking the experience to set it up correctly I can't drive a SRU [2]
But actually, this is easy enough just by looking at the code:

That should be enough I'd think:
$ grep -A 2 'change_header(' Mailman/Handlers/Tagger.py; grep -A 2 def Mailman/Handlers/CookHeaders.py | grep 'change_header('
        change_header('X-Topics', NLTAB.join(hits.keys()),
                      mlist, msg, msgdata, Delete=False)
def change_header(name, value, mlist, msg, msgdata, delete=True, repl=True):

@Mark - if you have not given up on this bug, if you can provide a
"steps to reproduce" please feel free to add.

[1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3011
[2]: https://wiki.ubuntu.com/StableReleaseUpdates

** Description changed:

- Code added to Tagger.py in 2.1.16 to support the from_is_list Wrap
- Message option contained a misspelling.
+ [Impact]
+ 
+  * Using Mailman Lists with topics enabled can fail due to a typo
+ 
+  * Fix is trivial and a backport active in everything >Trusty for quite a 
+    while now
+ 
+ [Test Case]
+ 
+  * I beg your pardon for not knowing a "live" case to set up, but I think 
+    it is obvious. With packages installed check the argument "Delete" vs 
+    "delete":
+ 
+ # grep -A 2 'change_header('  /usr/lib/mailman/Mailman/Handlers/Tagger.py
+         change_header('X-Topics', NLTAB.join(hits.keys()),
+                       mlist, msg, msgdata, Delete=False)
+ 
+ #  grep -A 2 def /usr/lib/mailman/Mailman/Handlers/CookHeaders.py | grep 'change_header('
+ def change_header(name, value, mlist, msg, msgdata, delete=True, repl=True):
+ 
+ [Regression Potential]
+ 
+  * It fixes an obvious broken variable access, but nothing else - so I'd 
+    consider it safe. I don't think any code reaching this line ever worked
+    but if one had a setup awkwardly working while accepting this breakage 
+    he might now get a different behavior.
+ 
+ [Other Info]
+  
+  * embarrassingly old
+ 
+ ---
+ 
+ 
+ Code added to Tagger.py in 2.1.16 to support the from_is_list Wrap Message option contained a misspelling.

-- 
You received this bug notification because you are a member of Mailman
Coders, which is subscribed to GNU Mailman.
https://bugs.launchpad.net/bugs/1251495

Title:
  Lists with topics enabled can throw unexpected keyword argument
  'Delete' exception.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mailman/+bug/1251495/+subscriptions


More information about the Mailman-coders mailing list