[Mailman-Developers] strange... digest volumes.

Tokio Kikuchi tkikuchi@is.kochi-u.ac.jp
Fri Oct 18 14:14:05 2002


Chuq Von Rospach wrote:
> 
> 
> I just noticed something weird. All my digest volume/numbers are 
> ratcheting up. When I installed 2.1b, I set all my volumes to 4 or 5, to 
> put them above any previous versions of my list servers.
> 
> tonight, some of the digests I got were volume 20, #1, volume 16 #4, etc.
> 
> I don't know what's going on yet, but I THOUGHT I set the things to 
> increment annually. I'll see waht I can find out.
> 
> anyone else seeing weird digest increment issues? Or have you looked for 
> them?

Yes, I'm seeing this. This patch may solve, I hope.

diff -u ~/src/mailman/Mailman/Handlers/ToDigest.py ToDigest.py
--- /home/mailman/src/mailman/Mailman/Handlers/ToDigest.py      Tue Oct  8 06:35
:04 2002
+++ ToDigest.py Fri Oct 18 22:06:46 2002
@@ -113,8 +113,8 @@
              weeknum_now = int(time.strftime('%W', now))
              if weeknum_now > weeknum_last or timetup[0] > now[0]:
                  bump = 1
-        elif timetup[7] <> now[7]:
-            # assume daily
+        elif freq == 4 and timetup[7] <> now[7]:
+            # assume daily <-- Don't assume that way!
              bump = 1
          if bump:
              mlist.volume += 1

Better to test the variable freq only in the if .. elif chain.

-- 
Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
http://weather.is.kochi-u.ac.jp/